Even if you have years of software engineering experience under your belt, the technical interview can be daunting!
For junior developers, you may be afraid that you haven't prepared enough—that you might call the wrong variable in a time crunch.
For senior software developers, the fear may be related to not being as familiar with programming language or concepts.
You've been managing teams for so long that your database skills aren't quite as sharp. Or maybe you're going out for a job that uses an object oriented language you've never used before.
You've read the books, taken courses, and still feel you may not be ready for the technical interview.
Luckily, we've put together a coding interview cheat sheet of all the major principles you can expect to see in your technical interviews.
In this guide, you will learn about:
Along with this cheat sheet, be sure to check out Exponent's Software Engineering Interview Course.
When it comes to data structures, nothing is simpler than an array. But arrays are far from insignificant!
An array is an ordered list of data that is accessible with a numerical index.
In many cases, software engineers will allocate arrays upfront as a single block of memory according to the amount of elements and kinds of data that must be stored in the array.
Because of this, arrays allow engineers to read and write elements more efficiently. Arrays tell your program exactly where every element is stored within memory.
Things to keep in mind for your technical interviews regarding arrays:
The next most fundamental data structure in software development is the linked list.
Linked lists allow engineers to insert/remove elements from a list without the need to re-allocate or move the elements.
In doing so, linked lists can thwart what would otherwise be the worst-case performance scenario of arrays.
Linked lists are also frequently used as a building block for anoother, more complex data structure.
Linked lists operate a little differently than arrays. Rather than storing data in blocks of memory, a linked list uses nodes connected to pointers.
During technical interviews, remember to use linked lists when you need to insert/delete items from a list.
This is especially important if the size of the list must be flexible.
Keep in mind arrays are better for indexing and hash tables are better for searching.
Hash tables are effective for searching.
Hash tables are key-value data structures that contain three parts:
The hashing function component of a hash table transforms the key. The key is a piece of data that is transformed into an array index by the hashing function.
The reason for this is the array index is used for efficient lookup.
Ultimately, this array index then becomes the hash table.
You should use a hash table if you need constant-time lookup, insertion, or deletion functions.
Remember that hash tables are not the best choice for storing sorted data.
Many coding languages have things like sets, objects, and dictionaries that utilize hash tables.
Depending on the language, the memory usage of a hash table may vary wildly.
In most cases, you should use a fixed-size array when creating a hash table. You should use linked lists for storing the data.
Another group of important data structures is graphs and trees.
A graph is a data structure composed of two elements: vertices linked together by "edges."
These edges can be directed or undirected, depending on how they are used.
There are many practical uses for graphs.
For example, in a GPS application, roads could be the edges, while intersections would be the vertices.
When it comes to technical interviews, it will usually be clear when to use graphs.
Your interviewer will likely tell you to use one outright, or the data set in question will consist of vertices and edges.
Trees are a data structure similar to graphs. They are also widely used on a day-to-day basis by software engineers.
They usually appear during the technical interview in search and traversal questions.
A tree is a collection of nodes in which every node includes references to zero or more child trees.
As you can probably already tell, trees are defined recursively.
This suggests that recursive algorithms are pertinent when faced with this kind of data structure.
The nodes in a tree are comparable to the nodes of linked lists.
However, the nodes of linked lists only contain one memory pointer to another node.
The nodes in trees, though, can contain any number of memory pointers to child nodes.
As such, trees are technically a kind of graph. They are sometimes referred to as directed acyclic graphs.
This means that basic algorithms such as breadth-first search and depth-first search are used alongside graphs and trees.
Things to remember about trees during your software engineering interview:
Stacks and queues are two high-level data structures used for storing a list of elements.
Queues operate along the lines of “first-in, first-out” (FIFO) behavior.
This means that elements are enqueued and dequeued in the same way they arrive, as the name suggests. The first element in is the first one out.
Stacks, on the other hand, operate oppositely. They use a “last-in, first-out” (LIFO) procedure.
This allows elements to be recovered in the reverse order they arrived.
Imagine stacks like stacks of pancakes. The top-most pancake, the first one to be retrieved, was the last to arrive.
Stacks and queues are typically executed alongside a linked list or array.
Stacks and queues are critical components of many basic algorithms in software engineering.
During your interview, it's best to use a queue when your problem requires you to process items according to the order received.
Stacks are used when items need to be received in reverse order.
Stacks and queues are often used in graph search algorithms, web crawlers, and storing application history.
Your interviewer may ask you to perform these general functions in your interview. Use the language you're most comfortable with.
Click here to learn more about Stacks & Queues from Exponent.
Sorting is an essential concept in software engineering and, by extension, engineering interviews.
There's a very good chance you will be asked a sorting question in your interview.
Click here to learn more about Sorting.
Exponent published a full guide to the system design interview. It's a technical interview cheat sheet in its own regard with
Load balancers help distribute incoming traffic so the system can maximize its total capacity while decreasing queuing time. They're an integral part of successful software development.
These become even more important as a system scales and handles larger amounts of traffic.
It is best to use load balancers during your interviews if you believe your system requires more capacity, especially as it scales.
In many cases, are positioned in between the external traffic and the servers of the application.
Click here to learn more about System Design.
There are usually many ways to solve coding problems. But not every solution is created equally.
Good software development is defined by algorithms that are both efficient and practical. So, comparing the performance of different solutions will be a fundamental part of your coding interviews.
The time complexity of a program refers to how long an algorithm takes to run based on the input length.
Time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the length of the input.
The space complexity refers to how much memory an algorithm needs to process that same input.
It doesn't matter what language you use in a coding interview. You should use whatever programming language you know in and out.
A dynamic language boasts compact syntax, makes it easier to type code, and features hash and list literals.
Whatever language you decide to work in, be sure to mention other languages you're fluent in to your interviewer. Tech company engineering managers want team members who are flexible and dynamic.
Expressing fluency in lower-level languages like C, C++, Rust, or even Go can help you stand out among other software engineers applying.
We recommend avoiding Java, C#, and PHP in your interview though. Interestingly, Triplebyte discovered that candidates who used these languages advanced in the interview process at lower rates.
Top tech company culture emphasizes adaptability and technical knowledge. Showcase the programming languages you know well and mention the ones you've built other projects with.
Successful software developers are often tinkering on side projects in languages they don't yet know to keep their skills sharp.
All software engineers get nervous during a coding interview. It's natural, and to be expected.
In fact, we'd be surprised if you WEREN'T curious about how your coding skills looked in the technical interview.
After your interview is over, here's what you should do:
Click here for more Software Engineering Interview Questions.
As you can imagine, you'll need more than this cheat sheet to set yourself up for the best success in your upcoming interview.
But don't fret. Here at Exponent, we have numerous different interview resources that will help put you in the best possible position to ace your software engineer interview:
💬 Practice with sample Software Engineer interview questions
📖 Read through our Software Engineering interview guides
👯♂️ Rehearse your behavioral and interpersonal skills with our interview practice tool.
👨🎓 Take our complete Software Engineering interview course.
Exponent is the fastest-growing tech interview prep platform. Get free interview guides, insider tips, and courses.Create your free account