{"id":2005,"date":"2021-07-06T07:25:19","date_gmt":"2021-07-06T14:25:19","guid":{"rendered":"https:\/\/coderpad.io\/?page_id=2005"},"modified":"2022-02-08T11:57:28","modified_gmt":"2022-02-08T19:57:28","slug":"technical-interview-cheat-sheet","status":"publish","type":"page","link":"https:\/\/coderpad.io\/resources\/learn\/technical-interview-cheat-sheet\/","title":{"rendered":"Technical Interview Cheat Sheet"},"content":{"rendered":"\n<p>Few people look forward to a job interview. Even though it\u2019s obviously nice to find a new career and end unemployment, the process of being judged and scrutinized based on your skills and personality is enough to make anyone uncomfortable. Worse still is when you <em>know<\/em> that you have the skills and experience you need for a job, but you\u2019re not sure whether you can adequately communicate this to your interviewer.<\/p>\n\n\n\n<p>It\u2019s a sad fact that sometimes people are better at a job interview than they are at the actual job. This is especially true during technical interviews, where people who have memorized certain strategies will often excel. With this being said, interviewing is a skill, and you can learn it in the same way that you\u2019ve learned how to code. Use this Technical Interview Cheat Sheet to understand the many ways that you can give yourself an edge during the interview process\u2014and then demonstrate your skills in your dream job.<\/p>\n\n\n<aside class=\"\n    cta-banner\n        \"\ndata-block-name=\"cta-banner\">\n    <div class=\"inner\">\n        <div class=\"content\">\n                            <h2 class=\"headline\">Need a better way to interview candidates? Try CoderPad.<\/h2>\n            \n                            <div class=\"cta-buttons\">\n                                    <a href=\"\/demo\/\" class=\"button  js-cta--get-a-demo\"  data-ga-category=\"CTA\" data-ga-label=\"Need a better way to interview candidates? Try CoderPad.|Get a demo\">Get a demo<\/a>\n                                <\/div>\n                    <\/div>\n            <\/div>\n<\/aside>\n\n\n\n<div style=\"height:48px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"interview-do-s-and-don-ts\">Interview Do\u2019s and Don\u2019ts<\/h2>\n\n\n\n<p>To begin with, there are some pointers that have commonality between technical and non-technical interviews. You should look your best, prepare adequately, and be congenial towards your interviewer. People are going to judge you primarily on your talent, but they also want to work with people that they like and who are easy to work with. Even if you\u2019re not sure you can memorize all of the technical information further down this list, you can still maximize your personal appeal to give yourself a better chance of getting hired.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"environment-control\">Environment Control<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"do-neaten-your-surroundings\">DO: Neaten your surroundings<\/h4>\n\n\n\n<p>Let\u2019s assume that interviews are going to be remote-only for the foreseeable future. Therefore, the background of your video call is something that you need to control. Make sure that your background shows a neat, well-organized space\u2014or use a filter that blurs is all out if that\u2019s not possible.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"do-test-your-setup\">DO: Test your setup<\/h4>\n\n\n\n<p>Make a test call to a friend of yours using the interviewer\u2019s videoconferencing application choice. This will ensure that your webcam, mic, and internet connection are in working order.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"don-t-assume-that-you-ll-be-familiar-with-the-coding-environment\">DON\u2019T: Assume that you\u2019ll be familiar with the coding environment<\/h4>\n\n\n\n<p>Interviewers are going beyond simple text editors during technical interviews. If your interviewer uses a solution like CoderPad, you\u2019ll find that it contains useful features like highlighting and autocomplete\u2014if you don\u2019t familiarize yourself beforehand, you may miss out on a vital tool.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"don-t-dress-too-informally\">DON\u2019T: Dress too informally<\/h4>\n\n\n\n<p>Although it\u2019s true that we\u2019ve all spent 2020 in sweatpants, interviewers will think better of you if you wear something other than pajamas. That being said, it\u2019s likely that you\u2019ll be sitting for a long time, so wear clothes that are comfortable, but not too casual.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"do-expect-behavioral-questions\">DO: Expect behavioral questions<\/h4>\n\n\n\n<p>Even though this is a technical interview, you may expect to hear some questions like, \u201ctell me about yourself\u201d or \u201cwhere do you see yourself in five years.\u201d Make sure that you have a few prepared answers to questions like this, so you don\u2019t get caught off guard. In addition, you should make sure that you have a prepared list of intelligent questions about the organization.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"don-t-forget-to-repeat-the-question\">DON\u2019T: Forget to Repeat the Question<\/h4>\n\n\n\n<p>There\u2019s a lot of pressure to start demonstrating your skills as fast as possible during a technical interview, but listening is also a skill. If you start coding right away without being sure that you\u2019ve fully understood the interview question, then there\u2019s a chance that you\u2019ll start trying to answer the question you <em>thought <\/em>you heard, and not the question your interviewer had in mind. Always read the interview question and then repeat the question back to the interviewer to ensure you\u2019re on the same page.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"do-clarify-understanding-of-inputs-outputs-and-side-effects\">DO: Clarify Understanding of inputs, outputs, and side effects<\/h4>\n\n\n\n<p>In the course of this technical interview cheat sheet, we\u2019d like to stress two important things:<\/p>\n\n\n\n<p>1. You\u2019ll never hurt your chances by asking for more information<\/p>\n\n\n\n<p>2. Coding in an interview is only an approximation of coding in real life<\/p>\n\n\n\n<p>This means that if you\u2019re not sure what your input is supposed to be, you won\u2019t lose points by asking\u2014and you\u2019ll lose a lot more points if you don\u2019t ask and get it wrong. In the same vein, if your code generates a side effect that you\u2019re not sure about\u2014ask. Side effects in the technical interview IDE may not be the same as side effects in the production environment.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"do-go-through-an-example-to-ensure-understanding\">DO: Go through an example to ensure understanding<\/h4>\n\n\n\n<p>Finally, technical interview questions are often left deliberately vague. To ensure your thorough understanding of the question, create a quick example that encapsulates the question. The interviewer should be able to tell you whether you have the right idea.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"do-consider-algorithms-in-niche-cases\">DO: Consider algorithms in niche cases<\/h4>\n\n\n\n<p>Algorithms are tough, but in the niche cases where they&#8217;re relevant, can be important to keep in mind. We&#8217;ve included a long list of useful resources to remember when dealing with algorithm interviews later on. Keep in mind, however, that most interviewers won&#8217;t expect you to memorize algorithms off-the-bat. Don&#8217;t be afraid to ask questions during the interview and vocalize your questions throughout the interview process.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"don-t-forget-to-test-your-code-logic\">DON\u2019T: Forget to test your code logic<\/h4>\n\n\n\n<p>It\u2019s worth saying again\u2014check your work. Audibly review the code you\u2019ve created. Not only does this help prevent mistakes, but it also helps demonstrate your thought process to your interviewer.<\/p>\n\n\n\n<p>Code behavior extends far beyond algorithms, which this advice is relevant for. Further, for people who have studied algorithms ahead-of-time, it&#8217;s likely that another part of their logic is broken, not algorithms.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"don-t-neglect-to-discuss-the-time-and-space-complexity-of-your-approach\">DON\u2019T: Neglect to discuss the time and space complexity of your approach<\/h4>\n\n\n\n<p>Computers don\u2019t have infinite resources, and good code economizes on time and space. Even if you\u2019re created a relatively time and space-intensive program for the interview, you can still score points by discussing how you\u2019re optimizing your program given additional resources. Likewise, some portions of development may not have the same requirements of complexity as others. Feel free to highlight when you&#8217;re simplifying code for maintainability.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"do-point-out-when-you-re-cutting-corners\">DO: Point out when you\u2019re cutting corners<\/h4>\n\n\n\n<p>Sometimes\u2014especially if you\u2019re running out of time\u2014you\u2019ll have to finish your program in ways that you\u2019d consider to be less than idea, such as by writing pseudocode. This isn\u2019t necessarily a dealbreaker, as long as you tell your interviewer what you\u2019re doing (and again, discuss how you\u2019d improve your process in an actual workplace environment).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"do-manage-whiteboard-space\">DO: Manage whiteboard space<\/h4>\n\n\n\n<p>Coderpad contains a helpful<a href=\"https:\/\/coderpad.io\/resources\/docs\/interview\/drawing-mode\/\"> Drawing Mode<\/a>, allowing candidates to sketch out a system or describe technical architecture. When using this, remember to try and make everything legible\u2014don\u2019t cram elements too close together or make things too small to read, as your interviewer will probably look at your diagram after the interview is concluded.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"coding-review\">Coding Review<\/h2>\n\n\n\n<p>Now that we\u2019ve gotten the do\u2019s and don\u2019t of our technical interview cheat sheet out of the way, let\u2019s start reviewing code. A lot of people memorize coding methods for technical interviews, but that\u2019s not necessary with CoderPad. That\u2019s because CoderPad lets you run the code you write during technical interviews, so if you don\u2019t memorize something fully, you can go back, check your work, and fix it. This simulates an actual workplace environment a lot more closely than the alternative.<\/p>\n\n\n\n<p>Even though you don\u2019t need to fully memorize data structures and algorithms, it still helps to review the fundamentals. Here\u2019s what you need to know.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"data-structures\"><strong>Data Structures<\/strong><\/h3>\n\n\n\n<p><br>Data structures can often be a major part of optimizing and organizing your codebase. While deep-dives on each of these concepts are outside the scope of this article, we\u2019ve provided a cheat-sheet for your next technical interview below. Find any that sound interesting? We encourage further reading to master them!<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"heap\">Heap<\/h4>\n\n\n\n<p>This kind of binary tree places the smallest value at the top. Helpful when creating priority queues.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"array\">Array<\/h4>\n\n\n\n<p>A data structure that places items sequentially. Offers fast lookups and appends, but its fixed size requires careful planning.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"dynamic-array\">Dynamic Array<\/h4>\n\n\n\n<p>Similar to an ordinary array, except that a dynamic array expands to fit additional elements as needed.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"linked-list\">Linked List<\/h4>\n\n\n\n<p>A flexibly-sized list in which each item contains a pointer for the next element. Although the list is easy to expand, lookups can take a lot of time.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"queue\">Queue<\/h4>\n\n\n\n<p>A data structure in which each item is stored in the order it\u2019s received.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"stack\">Stack<\/h4>\n\n\n\n<p>A data structure in which the last item to be stored is the first item to be addressed.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"graph\">Graph<\/h4>\n\n\n\n<p>Not an X\/Y chart. Graphs are formed by nodes, and the relationships between the nodes are denoted via lines (edges). Good for creating functional diagrams, but difficult to scale.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"trie\">Trie<\/h4>\n\n\n\n<p>Also known as a prefix tree, the trie is designed to store strings in a compact manner\u2014mostly in cases where you\u2019re storing words with a large number of shared prefixes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"priority-queue\">Priority Queue<\/h4>\n\n\n\n<p>Distinct from a regular queue. Each item in the queue is given a priority, and higher-priority items are addressed first regardless of when they entered the queue. See also: Heap.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"bloom-filter\">Bloom Filter<\/h4>\n\n\n\n<p>A probabilistic data structure that allows administrators to understand whether a set contains a given item\u2014sometimes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"lru-cache\">LRU Cache<\/h4>\n\n\n\n<p>Here, LRU stands for \u201cLeast Recently Used.\u201d It\u2019s a data structure that shows which item has gone unused for longest.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"hash-table\">Hash Table<\/h4>\n\n\n\n<p>Also known as a hash table, this data structure stores hashed items for quick lookup.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"binary-tree-aka-binary-search-tree-or-bst\">Binary Tree (AKA Binary Search Tree or BST)<\/h4>\n\n\n\n<p>A tree in which the nodes to the left are always smaller than the nodes to the right. Balanced trees offer the best performance.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"red-black-tree\">Red-Black Tree<\/h4>\n\n\n\n<p>A tree in which the black values remain constant, and the red values may change.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"b-tree\">B-Tree<\/h4>\n\n\n\n<p>A self-balancing BST variant in which nodes are allowed to have more than two children.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"union-find\">Union Find<\/h4>\n\n\n\n<p>Also known as disjoint set structure. Stores non-overlapping sets.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"search\">Search<\/h3>\n\n\n\n<p>Candidates asked to implement search will most likely encounter one of two search methods in a technical interview\u2014breadth first search and depth first search.<\/p>\n\n\n\n<p><strong>Breadth first search (BFS)<\/strong> searches across the tiers of a tree\u2014first the top node, then the layer of nodes beneath it, then the nodes beneath that, and so on. The primary advantage of BFS is that it can be used to find the shortest path between any two nodes.<\/p>\n\n\n\n<p>Meanwhile, <strong>depth first search (DFS)<\/strong> searches down pathways. Starting at the root of a data tree, it then searches all the way down one branch before moving on to the next. DFS is easy to implement and requires less memory most of the time.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"efficient-sorting\">Efficient Sorting<\/h3>\n\n\n\n<p>Sorting algorithms are another huge component of creating efficient code. Again, you don\u2019t need to memorize the algorithms below, but you should be aware of their time and space complexity.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"selection-sort\">Selection Sort<\/h4>\n\n\n\n<p>The cursor scrolls left to right through a dataset. Every time the right number is smaller than the left number, the right number gets moved to the all the way to the left until the whole data set is sorted. Simple but inefficient.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"insertion-sort\">Insertion Sort<\/h4>\n\n\n\n<p>The cursor compares itself to numbers on the left. If smaller, it changes places with the leftmost number and iterates until the data set is sorted.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"merge-sort\">Merge Sort<\/h4>\n\n\n\n<p>Divides the data set in half, then continues dividing until each item is an individual subset. Once this action is complete, the algorithm recombines the data set, sorting as it does.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"quicksort\">Quicksort<\/h4>\n\n\n\n<p>An algorithm that recursively divides a data set into two halves, placing smaller elements to the left and larger elements to the right, until the whole data set is sorted.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"bubble-sort\">Bubble Sort<\/h4>\n\n\n\n<p>Scrolls through a data set comparing every pair of numbers, placing the larger number on the right and the smaller number on the left, until the entire data set is sorted.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"heapsort\">Heapsort<\/h4>\n\n\n\n<p>A \u201cmax heap\u201d is created from a data set by comparing parent nodes with child nodes and then swapping them until the largest number is at the root. By deleting the root, swapping the first and last node, and starting the max heap again, you\u2019ll eventually sort all numbers from least to greatest.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"types-of-algorithms\">Types of Algorithms<\/h3>\n\n\n\n<p>Lastly, you should know the basic types of algorithms.<\/p>\n\n\n\n<p>A <strong>recursive algorithm<\/strong> triggers itself repeatedly until it reaches what\u2019s known as a base case, which is when the algorithm stops.<\/p>\n\n\n\n<p>An <strong>iterative algorithm <\/strong>also loops repeatedly, but only while a certain condition is true. These can be somewhat more efficient than recursive algorithms, but recursive algorithms can solve more complex problems.<\/p>\n\n\n\n<p>A <strong>greedy algorithm <\/strong>is given a set of specific criteria and then selects data that matches those criteria. This algorithm can improve the time efficiency of an application, but only in cases where there\u2019s a small amount of matching data in a large data set.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"asymptotic-notation\">Asymptotic Notation<\/h4>\n\n\n\n<p>Refer back to the \u201cReview time and space constraints\u201d section of the Do\u2019s and Don\u2019ts above. Asymptotic notation is used to describe how long your algorithm will run when given different inputs. There are three symbols you\u2019ll need to remember:<\/p>\n\n\n\n<p>\u00b7 &nbsp; Big O: Under the worst-case scenario, this is how long the algorithm will run<\/p>\n\n\n\n<p>\u00b7 &nbsp; Big Omega (\u03a9): This is the best-case scenario for runtime<\/p>\n\n\n\n<p>\u00b7 &nbsp; Big Theta (\u0398): The runtime value is the same in the best-case and worst-case scenarios<\/p>\n\n\n\n<p>In a multi-part algorithm, the runtime is always calculated using its slowest part. <strong>Please note:<\/strong> you can always communicate your applications&#8217; performance constraints if you&#8217;re unfamiliar with this terminology in a pinch.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>That\u2019s it! Using the tools, algorithms, and strategies in this technical interview cheat sheet, you should be able to master the application process. Before you begin, make sure to stretch your legs. Check out CoderPad, try out a few coding challenges, and neaten up your room\u2014it\u2019s time for a technical interview!<\/p>\n\n\n<aside class=\"\n    cta-banner\n        \"\ndata-block-name=\"cta-banner\">\n    <div class=\"inner\">\n        <div class=\"content\">\n                            <h2 class=\"headline\">Need a better way to interview candidates? Try CoderPad.<\/h2>\n            \n                            <div class=\"cta-buttons\">\n                                    <a href=\"\/demo\/\" class=\"button  js-cta--get-a-demo\"  data-ga-category=\"CTA\" data-ga-label=\"Need a better way to interview candidates? Try CoderPad.|Get a demo\">Get a demo<\/a>\n                                <\/div>\n                    <\/div>\n            <\/div>\n<\/aside>\n","protected":false},"excerpt":{"rendered":"<p>Few people look forward to a job interview. Even though it\u2019s obviously nice to find a new career and end unemployment, the process of being judged and scrutinized based on your skills and personality is enough to make anyone uncomfortable. Worse still is when you know that you have the skills and experience you need [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":280,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-2005","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/pages\/2005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/comments?post=2005"}],"version-history":[{"count":6,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/pages\/2005\/revisions"}],"predecessor-version":[{"id":4117,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/pages\/2005\/revisions\/4117"}],"up":[{"embeddable":true,"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/pages\/280"}],"wp:attachment":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/media?parent=2005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}