Competence is Confidence: Crushing the Technical Interview

Grace Yeung
TechTogether
7 min readOct 12, 2019

--

Last month, the TechTogether Boston team launched the first Medium article of the #TechTogetherWorks series and we are excited to present the next article of the series!

Anne Zhu, a senior at the University of Toronto majoring in Mathematics and Statistics with a minor in Computer Science and a member of the TechTogether Boston Tech Team, presents all her best practices for getting prepared for technical interviews. She just completed her first software engineering internship at Hypercare (a healthcare startup), and will be joining Coursera as a Software Engineering Intern in Mountain View starting in winter 2020!

As a non-CS major and someone who has never coded before university, she had a lot of difficulties landing a SWE internship. Anne landed her first SWE internship by cold messaging local startups on LinkedIn, which led her to a summer internship at Hypercare, where she got to work closely with the CTO of the company (an ex-Yahoo! engineer). During her internship at Hypercare, she worked on back-end engineering with a tech stack consisting of Node.js, GraphQL, Redis, AWS (SQS, ElastiCache), and MySQL. The CTO (also her mentor) helped her catch up on some of the fundamental topics in CS. Read on to learn more about these fundamentals so you can walk confidently into a technical interview!

What to Expect from Technical Interviews

Technical interviews can be overwhelming, the interview process for intern/new grad positions usually consists of a coding challenge, 1 to 2 phone screens, and then perhaps an onsite interview. If you’re pursuing a career as a software engineer, there’s simply no way around technical interviews, and the only way to get better at it is through practice.

Coding Challenges

There are roughly two types of coding challenges: 1) algorithmic + CS fundamental questions, or 2) coding projects. For the first type, you’ll need to be comfortable with Leetcode style questions and be able to code solutions quickly. Most companies use coding challenges to filter out candidates, you’ll likely need to pass most, if not all the test cases in the given timeframe (usually 1~2 hours). For coding projects, it could be a take-home project that you have to submit within a week, or a timed project on HackerRank.

Phone/Whiteboard Interviews

Phone interviews are usually conducted through an online coding environment, such as CoderPad or CodeSignal. A phone interview usually starts with a “tell me about yourself” question from the interviewer, then moving on to the technical part (1~2 coding questions or a single question with multiple sub-parts), and in the end, there should be some time for you to ask questions. During a phone interview, you will usually need to compile and run your code. However sometimes there can also be exceptions, for instance, you’ll need to code your solution in a Google Doc for Google’s phone interview. For whiteboard interviews or in-person/onsite interviews, you will be asked to write your code on either your own laptop or a computer provided to you.

There were several times where I panicked and my mind just blanked due to nervousness during phone/whiteboard interviews and I couldn’t solve a problem that I could’ve normally solved within 5 minutes. It’s very important that you get enough practice so you get used to the high-stress environment.

Practice, Practice, Practice!

Unfortunately, there’s no shortcut to getting better at solving algorithm problems, unless you naturally excel at them. However, as long as you are willing to spend time and effort, you’ll get better through practice. I solved ~100 questions on Leetcode over the span of a month, and that led me to job offers in the Bay Area.

(My Leetcode activity log!)

When practicing algorithm problems, try to focus on the fundamentals and start from the most commonly asked questions. Try to solve the problem without looking at the solution first, but if you get stuck for too long, make sure to read the solution and truly understand it.

As for system design questions, there are often no right or wrong answers, and you’ll need to know the tradeoffs among different solutions. A good way to prepare for those is to work through some classic examples (How would you design TinyURL, Instagram, YouTube, etc.), and always keep scalability in mind.

If you’re a non-CS major or have little experience with CS, you might want to make use of Cracking the Coding Interview, Geeks4Geeks (listed in the Resources section below) to learn about common data structures and algorithms.

What to Do at the Technical Interview

Coming Up with a Solution

Before you start formulating a solution, you should clearly state any assumptions that you are making and ask clarifying questions. Once you know how to approach the problem, you can walk your interviewer through your solution before implementing it. Remember, the interview does not only assess your technical and problem-solving abilities, they also want to know if you can communicate clearly. As you start to code your solution, explain your thought process out loud so the interviewer knows what you are doing. At any point in time, don’t be afraid to ask for hints if you get stuck.

Solving the Problem

It’s okay if you can’t get the most efficient solution right away, just state a brute-force solution first and then optimize from there. Once you have the brute-force solution working, you can start looking for ways to optimize it.

Optimizing your Solution

We always want our solutions to be as efficient as possible, whether in terms of time or space complexities. Consider time/space constraints and see if there’s unnecessary work that could be avoided. Be sure to check the “Technical Questions” chapter in Cracking the Coding Interview on a few approaches you can take to optimize solutions.

Topics to Review

Below are some topics that are highly likely to be asked in technical interviews.

Data Structures

  • Arrays/Strings
  • Hash tables
  • Time complexities for certain operations on arrays
  • Linked Lists
  • The runner technique
  • Trees, Graphs
  • Major types of trees
  • Construct trees and graphs
  • Implement tree/graph traversals (Breadth-First Search, Depth-First Search) by heart
  • Implement topological sorting
  • Heaps
  • Implement max/min heaps
  • When to use them
  • Stacks & Queues
  • How and when would you use these two abstract data types

Algorithms

  • Recursion & Dynamic Programming
  • Time & space complexities for recursion stacks
  • Memoization vs Tabulation
  • Sorting & Searching
  • O(n*log(n)) sorting (need to know how to analyze their worst case & best case runtime, how binary search works)
  • Greedy Algorithms
  • Common techniques

There are a few common techniques that you can use to solve problems. Once you get enough practice, you’ll be able to recognize the patterns and apply the techniques accordingly.

Consider a Sudoku game, we “backtrack” as soon as we realize the current solution does not lead us to a correct answer. The backtracking technique is used to solve similar recursive problems, instead of exhaustively generating all possible solutions, we backtrack at some point based on a certain set of constraints, therefore “prune” our recursion tree before going any further.

The Two Pointers technique is usually used to search pairs in a sorted array in a more efficient manner. We usually assign two pointers with one pointer that starts at the beginning of an array and one at the end of the array. We’ll usually set up some sort of rules for when the pointers should be advancing forward or backward based on the question.

Sliding Window problems usually have the optimal substructure property and are therefore considered as a subset of Dynamic Programming problems. When you are looking for some sort of contiguous subarrays/substrings in an array/string that satisfy some condition exactly, and the brute force solution runs in non-linear time, you will probably need to use a “sliding window”, and some constants to store information about your current window, so that we can achieve constant space and linear time.

Knowledge based questions

  • Object-oriented programming
  • Database design
  • System design
  • Threading

Helpful Resources

If you’re ready to get started, there are quite a few resources that could be very helpful for you to practice for interviews. I have summarized a few tools that I’ve found to be useful below.

Cracking the Coding Interview (CtCI)

CtCI is almost like the Holy Bible for Software Engineers! You can either download an electronic version online or buy the book from Amazon. Make sure to go over chapters on the important topics (as listed above).

Leetcode

Leetcode is probably the most popular website that software engineers use to practice for algorithm questions. To use Leetcode more effectively, you could try searching for questions that are frequently asked at the company that you’re interviewing for, or the specific types of questions that you would like to practice (for instance, Trees, Dynamic Programming, etc.).

GeeksforGeeks

You can find lots of practice problems specific to a topic/company on GeeksforGeeks, with detailed solutions provided. I would highly recommend going over this set of commonly asked problems.

Glassdoor

Not only can you get a sense of what the company culture is like on Glassdoor, the Interviews section can also give you a sense of what technical interviews are like at the company that you’re interviewing for.

CodeSignal

CodeSignal has an Interview Practice page where you can learn and practice the most important topics that show up during interviews.

Pramp

Pramp is a website where you can practice mock interviews with other people. I personally have not used it, but it should be very helpful if you haven’t had experience with interviews yet.

If this article was helpful to you, please leave some claps and share it with anyone you know who would find it helpful as well! Best of luck with your upcoming technical interviews and stay tuned for the next article in the #TechTogetherWorks series, which will be everything you need to know about Product Management!

--

--

Grace Yeung
TechTogether

Product Marketer @google, Co-Founder @productbuds