Explore 1.5M+ audiobooks & ebooks free for days

From $11.99/month after trial. Cancel anytime.

Crushing The Technical Interview: Data Structures And Algorithms (Java Edition)
Crushing The Technical Interview: Data Structures And Algorithms (Java Edition)
Crushing The Technical Interview: Data Structures And Algorithms (Java Edition)
Ebook875 pages5 hours

Crushing The Technical Interview: Data Structures And Algorithms (Java Edition)

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Learn the process of interviewing for a software development role, how to prepare, and all the information you will need to make it through the data structures and algorithms interview.

This book covers what to expect in each stage of the interview process, how to describe the complexity of an algorithm using Big-O notation, the basic software theories you will need to succeed, and how to answer behavioral questions meaningfully. Then you will learn the most important data structures and the minimum number of targeted algorithms needed in order to crush your coding interview. There are 75 unique coding problems for you to practice on, along with the solutions. Once you are done, you should be able to map the patterns you learn onto any problem and solve them with ease.

This book is available in various editions based on the programming language of your choice. This is the Python Edition.

LanguageEnglish
PublisherSpore Press LLC
Release dateApr 3, 2025
ISBN9798992869446
Crushing The Technical Interview: Data Structures And Algorithms (Java Edition)

Read more from Keith Henning

Related to Crushing The Technical Interview

Related ebooks

Programming For You

View More

Reviews for Crushing The Technical Interview

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Crushing The Technical Interview - Keith Henning

    Keith Henning

    Crushing The Technical Interview: Data Structures and Algorithms

    The study guide for data structures and algorithms interviews (Java Edition)

    First published by Spore Press LLC 2025

    Copyright © 2025 by Keith Henning

    All rights reserved. No part of this publication may be reproduced, stored or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise without written permission from the publisher. It is illegal to copy this book, post it to a website, or distribute it by any other means without permission.

    Keith Henning has no responsibility for the persistence or accuracy of URLs for external or third-party Internet Websites referred to in this publication and does not guarantee that any content on such Websites is, or will remain, accurate or appropriate.

    Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book and on its cover are trade names, service marks, trademarks and registered trademarks of their respective owners. The publishers and the book are not associated with any product or vendor mentioned in this book. None of the companies referenced within the book have endorsed the book.

    First edition

    ISBN: 979-8-9928694-4-6

    This book was professionally typeset on Reedsy

    Find out more at reedsy.com

    Publisher Logo

    To my son, Jay.

    Contents

    1. Introduction

    What to Expect

    Why I Wrote This Book

    Who This Book Is For

    Conventions in this Book

    2. The Interview Process

    Overview

    Recruiter Phone Interview

    Coding Challenge

    Coding Project

    On-Site Interviews

    Data Structures & Algorithms Interviews

    System Design Interviews

    The Process and Communication Interview

    Manager/Team Matching Interviews

    Now What Happens

    3. Big-O Notation

    Simplifying Big-O Notation

    Constant Time

    Logarithmic Time

    Linear Time

    Super-Linear Time

    Polynomial Time

    Exponential Time

    Factorial Time: Final Boss Fight!

    4. Software Theory

    Introduction

    Single Responsibility Principle (SRP)

    Open-Closed Principle (OCP)

    Liskov Substitution Principle (LSP)

    Interface Segregation Principle (ISP)

    Dependency Inversion Principle (DIP)

    Don’t Repeat Yourself (DRY)

    KISS Principle

    OOP Design Patterns

    5. Data Structures

    What Is A Data Structure?

    Arrays

    Lists

    Stacks

    Queues

    Linked Lists

    Graphs

    Trees

    Heaps

    Hash Maps

    6. Algorithms

    Bubble Sort

    Merge Sort

    Quick Sort

    Insertion Sort

    Tree Traversals

    Breadth First Search (BFS)

    Depth First Search (DFS)

    A* Algorithm

    Java Implementation 2

    Dijkstra’s Algorithm

    Two Pointers

    Sliding Window

    Backtracking (N-Queens Problem)

    Trie Data Structure

    Topological Sort

    Bucket Sort

    Quickselect

    Prefix Sum

    Monotonic Stack

    Union Find

    Prim’s Algorithm (Minimum Spanning Trees)

    Kruskal’s Algorithm

    Binary Manipulation

    Floyd’s Algorithm

    Median-of-Medians Algorithm

    Recursion with Memoization

    Huffman Coding Algorithm

    Red-Black Tree Algorithm

    Ford-Fulkerson Algorithm (Edmonds-Karp)

    Array Mutation

    7. Practice Coding Problems

    1. Arrays & Hashing: Character Pattern Matching

    2. Arrays & Hashing: Product Price Pairing

    3. Arrays & Hashing: Vocabulary Pattern Clusters

    4. Heap/Priority Queue: Trending Hashtag Analysis

    5. Arrays & Hashing: Supply Network Resilience Calculator

    6. Sliding Window: Optimal Document Segment

    7. Sliding Window: Extrema Product

    8. Arrays & Hashing: Longest Palindromic Substring

    9. Arrays & Hashing: Two Sum

    10. Trees: Level Order Traversal

    11. Dynamic Programming: Fibonacci with Memoization

    12. Graphs: Number of Islands

    13. Arrays & Hashing: First Non-Repeating Character

    14. Linked List: Reverse a Linked List

    15. Heap/Priority Queue: Balanced Network Traffic

    16. Graphs: Dependency Resolver

    17. Intelligent Cache System

    18. Trees: Text Editor Line Tracker

    19. Sliding Window: Message Rate Limiter

    20. Heap/Priority Queue: Evidence Processing Queue

    21: Arrays & Hashing: Circular Array Rotation Sequence

    22. Greedy Algorithm: Optimized Task Scheduler

    23. Greedy Algorithm: Interval Coverage Optimization

    24. Graphs: Dynamic Maze Flood Fill

    25. Heap/Priority Queue: Adaptive Resource Scheduler

    26. Graphs: Distributed Cache Consistency

    27. Arrays & Hashing: Maximum Subarray With Target Sum

    28. Sliding Window: K-Nearest Neighbors

    29. Backtracking: Matrix Circuit

    30. Dynamic Programming: Artwork Gallery Heist

    31. Sliding Window: Range Duplicate Finder

    32. Stack: Temperature Forecast Analysis

    33. Two Pointers: Scenic Skyline Viewpoints

    34. Two Pointers: Mountain Valley Rainwater Collection

    35. Greedy Algorithms: Maximum Property Value Appreciation

    36. Arrays & Hashing: Frequency Threshold Detection

    37. Arrays & Hashing: X-Sudoku Validator

    38. Greedy Algorithms: Vehicle Convoy Formation

    39. Stack: Maximum Productivity Zone

    40. Matrix Operations: Layered Security Clearance Search

    41. Binary Search: Document Processing Throughput

    42. Binary Search: Encrypted Circular Buffer Search

    43. Matrix Operations: Parallel Matrix Diagonal Sum

    44. Binary Search: Version-Based Configuration Store

    45. Binary Search: Minimum Processing Power

    46. Trees: Clone Bi1nary Tree with Connection Pointers

    47. Linked List: Rotate Linked List Around Pivot

    48. Linked List: Interleave K Linked Lists

    49. Trees: Path Matching Binary Tree

    50. Trees: Symmetric Tree Transformation

    51. Stack: Expression Tree Execution

    52. Stack: Balanced Bracket Sequence Generator

    53. Trees: Balanced Tree Reconstruction

    54. Trees: Optimal Node Removal for Minimum Height

    55. Tries: Context-Sensitive Search Suggestion System

    56. Tries: Fuzzy Word Finder

    57. Binary Search: Minimum Allocation Threshold for Equal Array Groups

    58. Binary Search: Kth Ancestral Element in Sorted Arrays

    59. Graphs: Key Collection Sequence

    60. Arrays & Hashing: Group Anagrams By Frequency

    61. Dynamic Programming: Maximum Product Path

    62. Graphs: Island Count with Restrictions

    63. Binary Search: Find Kth Element in Two Sorted Arrays

    64. Stack: Evaluate Reverse Polish Notation with Custom Operations

    65. Matrix Operations: Optimal Kennel Assignment

    66. Matrix Operations: Wedding Seating Arrangement

    67. Linked List: Boat Fleet Chain Inspection

    68. Linked List: Baseball Lineup Rotation

    69. Two Pointers: Coffee Bean Blend Matcher

    70. Sliding Window: Holiday Card Joy Maximizer

    71. Stack: Fashion Display Stack Optimizer

    72. Heap/Priority Queue: Restaurant Priority Seating System

    73. Backtracking: Optimal Race Day Strategy

    74. Graphs: Detective Case Assignment Network

    75. Dynamic Programming: Seasonal Orange Grove Harvest

    8. Problem Solutions

    1. Character Pattern Matching

    2. Product Price Pairing

    3. Vocabulary Pattern Clusters

    4. Trending Hashtag Analysis

    5. Supply Network Resilience Calculator

    6. Optimal Document Segment

    7. Sliding Window Extrema Product

    8. Longest Palindromic Substring

    9. Two Sum

    10. Level Order Traversal

    11. Fibonacci with Memoization

    12. Number of Islands

    13. First Non-Repeating Character

    14. Reverse a Linked List

    15. Balanced Network Traffic

    16. Dependency Resolver

    17. Intelligent Cache System

    18. Text Editor Line Tracker

    19. Message Rate Limiter

    20. Evidence Processing Queue

    21: Circular Array Rotation Sequence

    22. Optimized Task Scheduler

    23. Interval Coverage Optimization

    24. Dynamic Maze Flood Fill

    25. Adaptive Resource Scheduler

    26. Distributed Cache Consistency

    27. Maximum Subarray With Target Sum

    28. K-Nearest Neighbors in Sliding Window

    29: Matrix Circuit

    30. Artwork Gallery Heist

    31. Range Duplicate Finder

    32. Temperature Forecast Analysis

    33. Scenic Skyline Viewpoints

    34. Mountain Valley Rainwater Collection

    35. Maximum Property Value Appreciation

    36. Frequency Threshold Detection

    37. X-Sudoku Validator

    38. Vehicle Convoy Formation

    39. Maximum Productivity Zone

    40. Layered Security Clearance Search

    41. Document Processing Throughput

    42. Encrypted Circular Buffer Search

    43. Parallel Matrix Diagonal Sum

    44. Version-Based Configuration Store

    45. Minimum Processing Power

    46. Clone Binary Tree with Connection Pointers

    47. Rotate Linked List Around Pivot

    48. Interleave K Linked Lists

    49. Path Matching Binary Tree

    50. Symmetric Tree Transformation

    51. Expression Tree Execution

    52. Balanced Bracket Sequence Generator

    53. Balanced Tree Reconstruction

    54. Optimal Node Removal for Minimum Height

    55. Context-Sensitive Search Suggestion System

    56. Fuzzy Word Finder

    57. Minimum Allocation Threshold for Equal Array Groups

    58. Kth Ancestral Element in Sorted Arrays

    59. Key Collection Sequence

    60. Group Anagrams By Frequency

    61. Maximum Product Path

    62. Island Count with Restrictions

    63. Find Kth Element in Two Sorted Arrays

    64. Evaluate Reverse Polish Notation with Custom Operations

    65. Optimal Kennel Assignment

    66. Wedding Seating Arrangement

    67. Boat Fleet Chain Inspection

    68. Baseball Lineup Rotation

    69. Coffee Bean Blend Matcher

    70. Holiday Card Joy Maximizer

    71. Fashion Display Stack Optimizer

    72. Restaurant Priority Seating System

    73. Optimal Race Day Strategy

    74. Detective Case Assignment Network

    75. Seasonal Orange Grove Harvest

    9. Tips for Hiring Managers & Interviewers

    Take-Home Coding Project Challenges

    Why Top Tech Companies Don’t Use Take-Home Tests

    A Better Hiring Funnel

    For Candidates

    Final Thoughts

    10. Resources

    Top Leetcode Problems

    Recommended Books

    11. Appendix: Take Home Code Project

    In-Memory Cache For Online Advertising Agency

    About the Author

    1

    Introduction

    What to Expect

    I am passionate about developer advocacy and education. Helping developers thrive has always been a top priority at any company I have worked. Additionally, we have passed on hiring many great developers over the years by simply having poor screening processes. I can’t reform the hiring model for thousands of companies, but I can do this.

    I have taken a code-first approach to preparing for technical interviews in this book. In the following pages, I will go through four main areas: First, what the hiring process looks like today and how to succeed. Second, how to use Big-O notation to describe an algorithm’s computational and space complexity. Next, you need to know the primary data structures and how they work. Lastly, you should concentrate on the primary algorithms and techniques and the steps to perform them well in your interviews. You will also find many sample questions to practice with the answers provided.

    All of the code for this book is available at my website:

    http://technical-interviews.com

    Why I Wrote This Book

    A bit about me so that you can be comfortable that the information and guidance I am providing in this book is worth following:

    I have been in the software and technology industry for over 30 years. I started my career as a developer at Dell in the mid-1990s. Since then, I have worked chiefly leading technical teams with various titles such as Chief Operating Officer, Vice President of Technology, Director of Software Development, and Chief Architect. I have held these roles in Silicon Valley unicorn startups, mid-sized technology companies, and Fortune 500s, including Walmart, Dell, and Dollar General. IBM acquired a startup where I was the founding technologist and VP of R&D, and Cox Communications acquired a startup where I was the VP of Technology. I have consulted on projects as the lead architect for companies such as AT&T, Bank of America, and Caterpillar. I hold patents in personalizing online advertising and content based on accumulated buyer behavior online. I also write articles on the intersection of Intellectual Property law and innovation. I have a Masters in Computer Science from Georgia Institute of Technology, where I also help teach, and a Juris Doctor from the University of Arkansas. As of the writing of this book, I am Director of Enterprise Architecture for a Fortune 500 company. I hope to give you information you can use to get through an interview when I am on the other side of the table asking the questions.

    The one thing I have always disliked about this industry is the non-standard nature of the technical interviews. If you are a UX/UI designer, you bring your portfolio. If you are a mechanical engineer, you bring your portfolio and license. If you are a landscape architect, you bring your portfolio and license. If you are a software developer, it is convoluted and different from company to company. We need a professional licensing structure, not just whatever certifications different companies are handing out.

    Also, I hate having to do them (because the impostor syndrome is real). I find technical interviews stress-inducing, doubt-producing, and sometimes heart-wrenching processes where your best self seldom shines, and I will avoid them whenever possible. However, I have only done one technical interview without an offer because I always go prepared. As much as I dislike them, technical interviews are a necessary part of the process because they are the worst form of selecting developers, except for all others. No alternate process produces the desired results with the same accuracy: matching your skill-set with the current and future needs of the role and company interviewing you. This protects you as much as it does the company. Who wants to work in a role for which they are unqualified or unprepared? Certainly not me. The technical interview should set you up for success in your new job.

    I also know this process from both sides of the table. Throughout my career, I have conducted many hundreds of technical interviews. I am one of the people who will be interviewing you. In this book, I have attempted to distill the minimum knowledge you need to crush any technical interview and get an offer.

    Thank you for purchasing this book.

    Sincerely,

    Keith Henning

    Who This Book Is For

    This book is for anyone looking for a software developer role, whether you are just starting out and are looking for your first role or you are a senior trying to level up your career and need a quick refresher. If you think you are not good enough or talented enough, I am here to say you are wrong. Anyone, including you, can master the skills needed to succeed in a technical interview.

    And here is a secret nobody else will tell you: Interviewers are looking for a reason to say yes to your application. Except for the largest tech companies, the interviewers don’t want to interview dozens of people to fill one position. Your only role in the interview is to give them every reason to say yes. They want to hire you.

    You’ve got this.

    Conventions in this Book

    This book is centered around coding patterns. The goal is to learn the code patterns and how to solve problems by applying those patterns to similar problems. I will not give step-by-step instructions on problem-solving generally; other books do that better than I ever could. However, if you are a critical thinker and can break down problems into logical and manageable chunks to identify the type of pattern(s) you are encountering and then apply the correct solution pattern to it, this is the book for you. Anyone can use this code pattern matching to problem facts to solve problems.

    All code examples will be in the programming language edition you purchased.

    I’ve omitted extensive error checking for brevity, but in production code, you’d want to add Input validation, Bounds checking, Empty array handling, etc. For each data structure and algorithm, I have included a list of the interview questions you can expect. Take some time to understand why the solution pattern would be a good choice for solving that type of problem.

    I have added the includes and imports of libraries where they will better help you understand the code, but I have omitted them for standard libraries. All languages used for this book are Object-Oriented. Many others are popular options for different use cases. I chose these because they cover a more extensive scope of languages used. These are all imperative languages. I will not be covering functional languages such as Scala or Clojure in this book.

    Back-end and front-end development are two very distinct beasts. I have worked as a back-end developer and a full-stack developer. Neither is superior, but they have technology preferences, different cultures, and subcultures. This book is aimed toward general-purpose back-end development.

    In this book, you will see each concept or problem followed by Key Tips, which help you understand the problem, and/or Pro Tips, which will help set you apart from other candidates in an interview.

    Each concept section may have any or all of the following parts:

    Core Concept

    Java Implementation

    Real-World Application

    Performance Characteristics

    Key Tips

    Pro Tips

    Common Interview Questions

    Typical Follow-up Questions

    2

    The Interview Process

    Overview

    Technical interviews are inherently challenging and often anxiety-inducing experiences for developers at all levels, including myself. The process typically begins with a recruiter screen, followed by remote technical interviews as a coding challenge. Depending on the company, it may include additional stages involving a take-home coding project and on-site interviews.

    Hiring is also changing rapidly, with online assessments becoming a standard part of hiring before you talk to anyone. Some companies email you a link to take an online coding test the moment you apply for a position, and your application will not be looked at until you have successfully passed the assessment. Doing these quickly will put you ahead of others applying for the same role.

    Most companies follow a familiar pattern. The recruiter screen introduces the role and company; technical remote/phone screens assess coding abilities; later stages might evaluate system design and cultural fit.

    I would be worried if you didn’t feel nervous about technical interviews. Everyone gets some amount of interview anxiety. What’s important is recognizing that interview performance is a distinct skill from day-to-day engineering work. Like any skill, it improves with practice and preparation. Remember, luck = preparation + opportunity.

    I will break down each interview phase and provide concrete strategies for success. Whether this is your first technical interview or you are returning after years of experience, understanding the process will help ease at least some of the anxiety, and you can focus on being prepared.

    Recruiter Phone Interview

    The recruiter phone interview is a critical first step in the technical hiring process.

    Before diving into any recruiter call, proper preparation becomes your strongest ally. You should research the company’s mission, examine its tech stack, review its GitHub contributions, review engineering blog posts, and understand its core values. Creating a detailed document with this information helps structure your preparation and demonstrates genuine interest in the role. It doesn’t have to be fancy; it’s just a list of information to help you remember what the company is about in your favorite note-taking tool. Your note-taking tool is also a place to track applications, phone calls, recruiter contact information, application status, and the requirements for each role.

    Timing and presence during the call can make or break your impression. Through years of working with distributed teams, I’ve learned that while different cultures view time differently, interview punctuality is universal. Always join video calls five minutes early, ensuring your audio and video are crystal clear. This will also allow you to resolve any technical difficulties that may arise. Finding a quiet space with good lighting isn’t just about professionalism—it’s about creating an environment where you can focus entirely on the conversation at hand.

    Questions during the interview should demonstrate both technical understanding and genuine interest. When it comes to questions, this is where you can truly shine. Rather than asking basic queries about office culture, I’ve found success in demonstrating technical depth through thoughtfully crafted questions. Asking about their micro-services architecture approach or their strategy for balancing technical debt with feature delivery shows you’re thinking at a deeper level. These questions often spark engaging technical discussions that help you stand out from other candidates.

    The conversation should also explore the human aspects of engineering - you want work/life balance, don’t you? Inquiring about team collaboration practices and learning opportunities reveals the company’s commitment to developer growth. Understanding these elements helps you evaluate the fit between your career goals and the organization’s values. A recruiter call isn’t just an evaluation - it’s an opportunity to discuss mutual fit.

    Before wrapping up, always discuss the next steps so you can set your expectations.

    Your recruiter call is your first opportunity to demonstrate your value to their engineering team, so try to approach it with a strategy that showcases both your technical skills and your enthusiasm for the opportunity ahead. Success in recruiter calls comes from balancing technical knowledge with effective communication.

    Through numerous interviews on both sides of the table, I’ve learned that you find the right fit for you by treating each interaction as a chance to learn and grow while staying true to your technical expertise and professional aspirations. By this, I mean don’t fake what you don’t know, don’t exaggerate on your resume, and don’t take credit for work you didn’t do. You will be found out in the process. The key is finding that sweet spot between showcasing your technical skills and demonstrating your ability to communicate effectively with various stakeholders.

    Coding Challenge

    How to Crush Your Coding Challenge

    You will move on to a coding challenge if your recruiter phone interview goes well.

    Occasionally, this is also the point where you will be asked to log into a website and test your technical knowledge before moving forward. CodeSignal is one of these and offers a General Coding Framework (GCF) scoring system. GCF is a standardized coding exam companies use to evaluate candidates’ coding skills. Similar to the SAT or ACT, these automated screeners are becoming more common. The company also offers tests for senior developers called the Industry Coding Framework and tests (i.e., Frameworks) covering Data Analytics, Front End, System Design, Machine Learning, and Quality Assurance.

    The coding challenge is typically done in one-hour increments and conducted remotely on a platform like Zoom or Microsoft Teams. You will usually be paired with a developer in the company and asked a coding challenge(s) that you will do in a shared desktop or web-based IDE. It may be a large challenge or several smaller ones. For some companies, the initial problem is not what they are scoring but one of the follow-up questions that comes after you solve the problem. I give examples of these follow-up questions where appropriate. You may also be asked some general technical knowledge questions during the interview.

    In this book, I will give you everything you need to know to crush your coding interview. Pure software companies have different requirements for their developers than small, mid-sized, and Fortune 500 companies that may focus on supply chain management or call center routing. There are plenty of online resources where people break down their interviews with FAANG companies - Facebook (Meta), Amazon, Apple, Netflix, and Google - and which problems they were asked to solve, and most other companies typically follow their lead. You are welcome to read these over, but in this book, I am distilling all the methodologies you will need and a handful of specialized algorithms you should memorize to do well. I know from experience that the questions asked at a company like Walmart and those requested at Amazon are nearly identical and focus on the same areas. Of course, there are always differences in technical cultures between companies; Google tends to include Dynamic Programming questions, and Meta tends never to ask Dynamic Programming questions.

    What language should you use for your study and coding challenge? The one you are most comfortable with and experienced with. In short, unless you are interviewing for a company that exclusively uses Scala and Scala is also your daily driver language, use a different language for study and your code interviews.

    Data Structures and Algorithms

    I have limited this book’s algorithms and data structures to those you will most likely see in an interview. Any other interview questions you face may be a variation on one of these or one that is entirely novel and needs memorization.

    The top algorithms to focus on include sorting algorithms like Merge Sort and Quick Sort, searching algorithms like Binary Search and Quickselect, graph traversal algorithms (BFS, DFS), greedy algorithms, backtracking, and basic data structure operations on arrays, linked lists, and trees. There is a strong emphasis on understanding each algorithm’s time and space complexity. Some understanding of dynamic programming is also needed.

    Sorting Algorithms:

    Merge Sort: Efficient for large datasets, uses divide and conquer strategy.

    Quick Sort: It also uses divide and conquer and can be faster than Merge Sort in specific scenarios.

    Heap Sort: Good for finding the maximum or minimum element quickly.

    Searching Algorithms:

    Binary Search: Efficient for sorted arrays, halves the search space with each iteration.

    Linear Search: Simple search for unsorted arrays.

    Quickselect: When finding the kth smallest/largest element in an unsorted array.

    Dynamic Programming:

    Breaks complex problems into smaller sub-problems, often used for optimization problems.

    Examples: Longest Common Subsequence, Knapsack Problem

    Graph Algorithms:

    Breadth First Search (BFS): Visits all nodes at the same level before moving to the next

    Depth First Search (DFS): Explores as deep as possible in one branch before backtracking

    Greedy Algorithms:

    Makes locally optimal choices at each step to find a global solution

    Backtracking:

    Explores all possible solutions by recursively trying different options and backtracking when necessary

    Data Structures:

    Arrays: Efficient for random access

    Linked Lists: Flexible for insertions and deletions

    Trees: Hierarchical data structure with various traversal methods

    Heaps: Useful for priority queues

    Hash maps: Fast key-value lookups

    If you are short on time, less than three months to prepare, the most common data structures and algorithms that you absolutely must know are stacks, heap, hash map, merge sort, quick sort, linked list, depth-first search (DFS), and breadth-first search (BFS). I have included a table below based on how often and what importance is placed on each, from A-tier algorithms and concepts you must know to lower-tier algorithms you may only encounter occasionally. You will notice that most of the A-Tier items are foundational concepts.

    The specialized algorithms you need to memorize to master are A*, Dikstra’s Algorithm, Kruskal’s Algorithm, Topological Sort, Trie, Prefix Sum, Floyd’s Algorithm, and Quickselect. These are typically impossible to reason through quickly if you don’t understand the optimizations they are doing beforehand.

    Coding Project

    How to Crush Your Coding Project

    I will provide you with everything you need to succeed. In the appendix, I have included an example of an actual take-home coding project.

    Take-home coding projects offer a unique opportunity to showcase your development skills in a realistic environment. Unlike the high-pressure atmosphere of live coding interviews, these projects let you demonstrate your thoughtful approach to software development, attention to detail, and technical craftsmanship.

    You will sometimes be given a take-home project instead of an on-site technical interview or coding challenge. Some may require all of them. You will be prompted to create a small application or a few in your take-home coding project.

    Setting Yourself Up for Success

    Understanding project expectations before diving into code is crucial. I’ve learned through experience to ask clarifying questions about the tech stack requirements. Don’t spend hours crafting a solution in C++ when the team is specifically looking for someone with Java expertise. Always confirm key details, such as preferred frameworks, submission format, and evaluation criteria. So be sure to clarify any requirements before you begin.

    What’s Being Assessed?

    Take-home challenges evaluate multiple dimensions of your capabilities. Code quality is paramount - companies want to see if you can write clean, maintainable code that meets their standards. Your decision-making process also comes under scrutiny, as the choices embedded in your code reveal your technical judgment. Adherence to the instructions demonstrates your attention to detail. Additionally, your communication skills shine through in your README and documentation, speaking volumes about your ability to explain technical concepts clearly.

    Set Clear Boundaries

    Time and scope management is crucial. Rather than trying to implement everything imaginable, allocate a specific time frame for completion. Analyze what’s realistic within that window and prioritize quality over quantity. While other candidates scatter their focus across multiple features, your concentrated effort on fewer, well-executed components will stand out. Be realistic about what you can accomplish with the time you have allotted.

    Break Down and Plan

    Treat this like a small project: divide the challenge into smaller, more manageable chunks. Write out your flow chart and list of components before you start. Solve the problem conceptually before writing a single line of code. You can estimate time requirements for each component so you don’t go over your allotment. Being methodological at the beginning ensures you don’t miss critical requirements.

    Prioritize Testing

    Even when not explicitly required, automated tests elevate your submission significantly. Consider using Test-Driven Development if it suits your style, and aim for meaningful test coverage and code coverage that demonstrates you understand what’s worth testing and what isn’t. Include unit tests at a minimum. Tests signal that you are a professional and care about code quality. Some companies will specify that you need at least 70% test case coverage or similar in the design document.

    Documentation

    Consider your documentation your project’s handshake - the first interaction reviewers have with your work. Your README should guide them through:

    How to setup the application and any dependencies

    Running the application seamlessly

    Understanding your technical decisions

    Navigating the code base efficiently

    Following your thought process

    You will typically submit your project as a Zip file or a Github link.

    A take-home project isn’t just about proving you can code - it’s about demonstrating how you approach real-world software development challenges. Your solution should reflect the same care and consideration you’d give to the production code. Here is a template for an exceptional README file:

    # Project Title

     

    ## Quick Start

    [Clear setup instructions]

     

    ## Problem Understanding

    [How you interpreted the requirements]

     

    ## Solution Approach

    [Your overall strategy]

     

    ## Implementation Details

    [Key components and how they work together]

     

    ## Decisions and Trade-offs

    [Explain why you made certain choices]

     

    ## Future Improvements

    [What you'd enhance with more time]

     

    ## Testing Strategy

    [How you verified correctness]

    The Decisions and Trade-offs section is particularly valuable. It shows that you can think critically about engineering choices.

    Final Steps

    Before you send off your code, I want you to do the following:

    Remove Code Comments. Once you are done with your code, step away for a while, then come back and read through it, cleaning it up and removing unnecessary comments, such as the many ToDos you have scattered throughout.

    Refactor Poor Code. If any areas of your code could perform better, refactor them to optimize them. If you have a nested for-loop, it is time to eliminate it.

    Include Your Design Document. Clean up your design document and submit it with your code, even if it is not requested. It will demonstrate how your code is supposed to operate and that you are a detailed developer.

    The goal isn’t to create a perfect solution but to show how you think, work, and communicate. By approaching take-home coding projects with intention and care, you’ll outshine the competition and genuinely improve as an engineer.

    Sample Coding Projects

    The appendix shows an example of an actual take-home coding project. It is a slightly changed actual project from a real company. Look these over and go through the process of making a design document and estimating the time for each module. This will help you better prepare for a coding project and ensure you have your tool-sets set up to build and deliver an application.

    On-Site Interviews

    How to Crush Your On-Site Interview

    Before COVID-19 (BC), on-site interviews were standard; I will cover it here. However, After COVID-19 (AC), many companies have elected to conduct multiple (5-6 on average) remote interviews with various team members. Do not let the fact that you are not receiving an invitation for an on-site interview make you think you are not a strong candidate. Many teams, such as mine, are primarily remote. Having you come to an office to interview would mean flying you in for several days and many of the people you would interview with. Instead, the market seems split on whether to conduct on-site or not. As of this writing, the trend has been for more on-site interviews again for many prominent tech companies.

    The on-site session is often the most stress-inducing part of the hiring process. You will typically arrive at the company office early in the morning, wait until someone gathers you, be issued a visitor badge, and are led to the first of your 4-6 consecutive interviews, each lasting 45-60 minutes. You will usually receive an email with your interview schedule beforehand. Expect several of these to be Data Structures and Algorithms interviews, usually one on Systems Design, Process and Communication (i.e., Behavioral), and Manager/Team Matching.

    You may be asked to go to lunch with a team member. Do not let your guard down! Consider the time spent at lunch with team members as also being graded. Be polite and professional, and ask some questions about the company you have prepared as part of your interview preparation. I have witnessed every sort of self-sabotage during the lunch period. Don’t let it happen to you.

    During your lunch, do not order anything expensive or difficult to eat. People will be asking you questions and also evaluating your table manners (really!). You don’t want a mouth full of spaghetti when they ask you a question about your long term goals. And you don’t want to be wearing any of that spaghetti sauce the rest of your day. Simple, bit sized, and not messy. Just keep it simple, you can go have a nice dinner later to celebrate.

    During your On-site interview, you will spend at least half a day doing difficult mental work while also explaining what you are doing and why you are doing it to an ever-changing cast of complete strangers repeatedly. I couldn’t imagine a more nerve-wracking process.

    You will also have additional factors adding to your stress: what clothing to wear, how to commute in a new city to a new building, and possibly how to navigate an unfamiliar corporate campus. Please do not spend too much time on this and have it sorted well before you are nearing your interview date.

    Decide a week ahead of time which two outfits you could wear depending on the weather: one for cooler weather and one for warmer weather. You will take both with you. And if you are going in cooler weather, please layer. The temperature of the building you will be in may be frigid in most locations but nearly sweltering in the small interview room you are placed in, or vice versa. Ask your recruiter what constitutes suitable attire, which will likely be business casual.

    I carry with me charcoal chinos, a navy blue polo, and a light blue Oxford cloth button-down shirt so I can choose on the day. I pair this with a plain brown belt and brown Oxford shoes with gum soles. I carry a suitable jacket or blazer in navy or dark blue if needed. I am set for whatever weather I face the morning of my interview.

    In fact, this is my everyday uniform as well. You will seldom find me not wearing a navy polo or light blue button-down, though I may pair it with jeans when working remotely behind a camera all day. I have essentially removed this decision from my daily schedule, reducing the number of decisions I have to make and lowering my overall daily decision fatigue. Choose your own work uniform.

    For women, it’s pretty much the same outfit: dark pants in charcoal, black, or navy or a modest skirt in the same colors if that is what you are comfortable with. Pair that with a plain white button-down or black V-neck, and over that, a blazer or jacket in gray or blue. Complete the look with simple black flats or pumps, and you are good.

    For men and women, be sure to wear an appropriate undergarment beneath your shirt or top.

    Appropriate dress is different from region to region and from industry to industry. If you are interviewing on Wall Street in New York or for a legal consulting firm in D.C., a suit might be required (when they say dress casual, they mean you don’t have to wear a tie, and your shirt doesn’t have to be white). If you are in Palo Alto, anything above a t-shirt and hoodie might be seen as dressy.

    Do not wear too much perfume or cologne. People will have to be sitting in small rooms next to you all day. Deodorant, yes! Perfume, no.

    Also, make sure you understand where your hotel and office are located. Your recruiter should be able to help with this, too. The easiest option is to hail a ride-share service, set up the request when you wake up, and schedule it so you arrive 30 minutes early. You can look in Google Maps and Google Street View to become familiar with your route and what the building looks like. When heading to your interview, do not let stress around these details impact your confidence and mental state.

    Once you arrive at your interview, the specific lineup will vary by company, but here are the main types of sessions you’re likely to encounter (your recruiter should provide details about your particular schedule):

    Data Structures & Algorithms Interviews - These assess your problem-solving abilities and coding fundamentals through whiteboard challenges or laptop coding exercises. Expect questions on time/space complexity analysis and optimization techniques relevant to back-end systems. (This book will prepare you for these.)

    System Design Interviews - For server-side roles expect questions on databases (SQL vs. NoSQL), API design principles, microservices architecture, caching strategies, and perhaps designing a scalable system component. You might be asked to diagram a solution for handling high traffic or data processing challenges. (There will be a follow on book specific to System Design interviews)

    Process & Communication Interviews - These evaluate how you work with others, handle conflicts, and communicate technical concepts to various audiences. Back-end developers must often explain complex system constraints to product managers and front-end teams.

    Manager/Team Matching Interviews - Often more conversational, these help determine which team would best fit your skills and working style. This might include discussions about your experience with specific technologies in the company’s stack or how you’d approach particular back-end challenges they face.

    Problem-Solving Tips

    Interviewers often care more about your problem-solving approach than perfect solutions recall. In an interview, you should always:

    Clarify the requirements. Before starting, ask any questions to make sure you understand the assignment.

    Work through examples.

    Discuss potential approaches.

    Implement the chosen solution.

    Always include tests. Test with happy path and edge cases where appropriate.

    Data Structures & Algorithms Interviews

    Data structures and algorithms interviews can trigger severe anxiety, especially for developers who don’t necessarily use red-black trees or implement quicksort in their day-to-day work. I’ll dive deep into

    Enjoying the preview?
    Page 1 of 1