Studying for Tech Interviews
Many technical interviews tend to involve being asked coding questions and then having to solve them. This typically involves working knowledge of data structures and algorithms.
Getting Started
What are “data structures and algorithms”?
Data structures are just different ways or organizing and storing data within code. Examples of these are: Array, Linked Lists, Stack, Queues, Trees, Graphs, Sets, Hash Tables.
Algorithms are simply a particular approach to solving a problem with code. Algorithms involve writing lines of code which often access data structures and then performs operations and calculations on the data (sorting, searching, adding, removing, etc).
Used together, you can select one or more data structures to store your data, and then use particular algorithms to achieve a particular goal or solution within your software programs.
For example, you might be asked to “reverse a linked list” or “sort an array of numbers” which combines a data structure (linked list or array) with an algorithm (reverse or sort).
How should I study for technical interviews?
Generally, studying for technical interviews involves the following steps:
Buy a book like Cracking the Coding Interview and others recommended below.
Learn about the specific steps you should be taking in a coding interview
Learn about the major data structures and the most common algorithms via videos, written guides, books
Practice easy problems online coding solutions to various problems that involve different data structures and algorithms you’ve read about
Learn about Big-O notation and how to evaluate how efficient your solution is
Review optimized solutions available to see how you can improve your solutions
Repeat. Practice more. Repeat again. Lots of repeating.
Be aware that there are many different data structures and algorithms, and many different difficulty levels of problems ranging from relatively straightforward to very advanced techniques.
Becoming confident and proficient in the full range of common interview questions could take months of studying and hundreds of hours. Don’t get discouraged, be patient and remember to take things one step at a time.
How does a coding interview usually work?
Check out our guide here for a detailed breakdown of how interviews work. There are specific steps to how to tackle a problem during a coding interview which should review carefully and practice.
Core Topics for Review
The following topics tend to be encountered most often in coding interviews broken up into multiple levels. Do not attempt to review all of them at once, instead study a few and then do some practice problems with them on sites linked later in this guide.
If you are looking for introductions to these concepts that are fun and accessible, check out BaseCS and the related podcast. You can also read through this algorithms tutorial series.
Level 1
Basic data structures I: Hash Tables, Stacks, Queues
Level 2
Basic data structures II: Linked Lists, Arrays, Strings
Complexity Analysis: Big-O Notation
Level 3
Traversal data structures: Binary Trees, Graphs
Searches: Binary Search, Breadth First Search/Depth First Search
Level 4
Advanced I: Recursion, Backtracking and Combinatorials
Advanced II: Dynamic Programming and Greedy Algorithms
Check the books and links below for more resources to use while practicing and learning data structures and algorithms.
Buy a Book: Cracking The Coding Interview
If you only want one book for technical interview prep, download Cracking The Coding Interview or buy the book on Amazon.
The “Before the Interview” section goes over resume tips, common non-technical questions you may be asked, and an overview of the technical topics you want to familiarize yourself with.
The “Interview and Beyond” section has general strategies for how to approach the interview, solving technical questions, and negotiating once you get an offer. (We highly recommend reviewing this section).
The rest of the book is the interview questions split into different sections based on topic, focus on the topics you’re least comfortable with. For intern/new grad applicants, I’d recommend prioritizing Chapters 1-4, 8, 9, and 11 since those sections cover the core topics.
If you are looking for additional books that are complementary to CTCI, we recommend:
Algorithms to Live By: The Computer Science of Human Decisions - This is more of a casual look and more “fun” then CTCI
The Algorithm Design Manual - Great for interview prep but also more in-depth and better at painting the big picture. Also provides interesting real life case studies of certain algorithms and data structures.
Introduction to Algorithms - This is not as accessible to newcomers or beginners, but if you want a comprehensive and exhaustive algorithms bible, this is the book for you!
Practicing Problems
You can review and practice problems at all these websites below:
Leetcode: LeetCode is a great platform to help you enhance your skills, expand your knowledge and prepare for technical interviews.
InterviewBit - Online site for practicing interview questions
Firecode.io: For daily technical interviews practice which incorporates fundamentals.
HackerRank:Leading end-to-end technical recruiting platform for hiring engineers.
Career Cup: Peers post interview questions they have been asked, and other can contribute their own answers to these questions. A major goal of this website is to give users an inside look at the interview process of different companies. They also offer a mock interview service.
Project Euler: Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve.
Python Tutor: Python Tutor helps students overcome a fundamental barrier to learning programming: understanding what happens as the computer runs each line of source code. Visualize Python, Java, JavaScript, TypeScript, and Ruby code execution.
You can practice interviewing on a video chat with:
Pramp - Practice coding interviews live!
Interviewing.io: Free, anonymous technical interview practice with engineers.
Last updated