Get a free weekly practice problem!

Keep that axe sharp.

× No thanks

Facebook Interview Questions

We've helped several engineers get the job at Facebook

Lexi got the job at Facebook:

Lexi, happy user

Interview Cake helped me feel confident and ready to crush my coding interviews. The questions taught me how to approach new problems, which is much more valuable than a set of answers to memorize.

Get ready for Facebook with the free 7-day crash course!

In this free email course, you'll learn the right way of thinking for breaking down the tricky algorithmic coding interview questions Facebook loves to ask.

Practice Questions for the Facebook Interview

Facebook's coding interviews are hard, but not impossible. Like anything else, it just takes practice. We'll walk you through it, step by step.

Girl Scout Cookie Conspiracy »

A friend and I are trying to win the prize for most Girl Scout Cookies sold. Write a function to merge our sorted arrays of orders into one sorted array of orders. Think about edge cases! What happens when we've finished merging one... keep reading »

MillionGazillion™: A New Search Engine »

I wrote a web crawler that's running on my old desktop computer in my parents' basement (where I totally don't live anymore), and it keeps running out of memory... keep reading »

Binary Search Tree Checker »

Write a function to check that a binary tree is a valid binary search tree. Careful: checking a node against its parent isn't sufficient to prove... keep reading »

Does This Linked List Have A Cycle? »

Write a function contains_cycle() that takes the first node in a singly-linked list and returns a boolean indicating whether the list contains a cycle. Careful—a cycle can occur in the middle of a list, or it can simply... keep reading »

The Nth Fibonacci Number »

This one's a classic, but there's more than meets the eye. Our first thought might be a naive recursive solution, but it has a massive time cost... keep reading »

Find The Rotation Point In An Array »

I have an array of words that are mostly alphabetical, except they start somewhere in the middle of the alphabet, reach the end, and then start from the beginning of the alphabet. In other words, this is an alphabetically ordered array that has been "rotated"... keep reading »

Implement a Queue With Two Stacks »

This one's a classic toy problem that will really help you understand the importance of the different properties of queues and stacks. There's a naive solution, but then there's a much more efficient... keep reading »

Product of Other Numbers »

You have an array of integers, and for each index you want to find the product of every integer except the integer at that index. Write a function that takes an array... keep reading »

Permutation Palindrome »

Write an efficient function that checks whether any permutation of an input string is a palindrome. We can do this in time and... keep reading »

Check the Fairness of our Cafe Kitchen »

My cake shop is so popular, I'm adding some tables and hiring wait staff so folks can have a cute sit-down cake-eating experience. Recently, some customers have been complaining that people who placed orders after them are getting their food... keep reading »

Posters in Facebook's Singapore office

Posters in Facebook's Singapore office. Facebook has a unique "hacker" engineering culture, with mottos like "move fast and break things."

How to Crush Your Coding Interview

Posted by Facebook Engineering on Thursday, October 30, 2014

"We will ask you to do a *lot* of coding during the interview process, because programming ability tends to correlate strongly with how well people perform as employees."

"Brush up on techniques that you may not use every day, but are very useful when you need them: recursion, graph theory, tree traversal, combinatorial problems, etc."

 

—Carlos Bueno, "Get that job at Facebook."

. . .