Profile photo for Sief Khafagi

As a recruiter at Facebook, I help people “crack” the coding interview. There isn’t a single, defined path to success but there are a few things that candidates who do well, have in common.

This list of 10 things come from the candidates I’ve seen ace these interviews and have gone on to work at every major tech company, unicorn and fast growing startup I can think of.

The goal is to write just the right amount of good code and communicate well. You’re not paid to code, you’re paid to think and figure out problems. The byproduct is crystallized thought and instruction for a machine to follow in the form of code. I’d rather solve a problem in one line of clear readable code than 10 lines of code that’s difficult to understand. I’d rather solve a problem in 5 lines of readable commented code than one line of highly complex, multi-nested code with multiple ternary operators. You get the idea. - Thanks Benjamin

  1. Cyndy’s first point of being really good with data structures and algorithms is absolutely correct. More specifically search algorithms for the companies mentioned. This is one the best resources for algorithms online and a terrific guideline for getting good at the fundamentals. Here’s a link for Classic Algorithms and Data Structures with projects to help you level up those skills and get interview ready.
  2. I also recommend buying the book “Cracking the Coding Interview” and doing the following: Go buy a whiteboard, put 35 minutes on a timer, go through as many problems as you can in “Cracking the Coding Interview” (try for 2 per hour, take a 20 minute break and do it again a few times), repeat and this time give yourself constraints. Great, feel comfortable? You should feel very comfortable with a whiteboard because your actual interview is likely on a whiteboard. Simple, right?
  3. Now back to algorithms and data structures. Why am I repeating this? It’s because it’s incredibly critical. The Big-O Cheat Sheet is a good resource for complexities of common algorithms used in Computer Science. For data structures, visualize the behavior and play with its operations here - Data Structure Visualizations. Extra points if you have the time to go through Sorting Algorithms.
  4. Start practicing today. Even if it is just Leetcode or Hackerrank or whatever you choose. You are a result of the work you put in and if you really want to ace it, start teaching it to friends, family or anyone who will listen. The more you talk about it out loud, the better and faster you’ll get.
  5. Learn to love debugging and showcase that in your interview. This is a great resource for how to do that.
  6. Learn to “think out loud”. It’s weird, I know. But in an interview setting, the most important piece is showcasing how you’ve come to a solution or understanding why you’re doing X before Y.
  7. You’re interviewer wants to see 3 key things in your code. It should run fast, not take up more memory than it needs to and is stable and easy to maintain. Accomplish that and you’re already ahead of most people.
  8. Master a single language. Places like Facebook, Google, Amazon and other top companies want to know you’re a good coder and they don’t care which language it’s in. If you ask me, I’d probably not choose something like C# but hey, whatever rocks your boat.
  9. Remember that 70% of questions consist of one of the following: Hash tables, Linked lists, Breadth-first search, depth-first search, Quicksort, merge sort, Binary search, 2D arrays, Dynamic arrays, Binary search trees, Dynamic programming, Big-O analysis. If you’re comfortable with all of these, the odds are already in your favor.
  10. Remember it’s not all about the code. How you can articulate your story, non tech or tech, if you’re likable, enthusiastic, have a passion/hunger for learning or are generally someone with potential can take you a very, very long way. People hire people.

Footnotes

View 39 other answers to this question
About · Careers · Privacy · Terms · Contact · Languages · Your Ad Choices · Press ·
© Quora, Inc. 2025