Skip to main content
Facebook logo

Welcome to Facebook Coding Interview Prep

Test duration43200 mins
No. of questions50 questions
Platform Help|Execution Environment|FAQ

Instructions

 

 

Welcome to Facebook Coding Interview Prep!

First, this is not a test. It is a collection of coding problems you can practice before your upcoming interview at Facebook.

We want you to know the kinds of problems you might encounter during your coding interview, so we’ve organized some representative questions by difficulty and by knowledge category. For each question, you’ll have the opportunity to solve it using any language you like, and you can submit your answer to be tested for correctness.

Few important notes before you get started:

  • Remember: this is not an assessment that will be used as a factor in your application for a role at Facebook.   
  • You are free to choose any language from the list to practice with.
  • Feel free to use any resources you want to help you understand the questions and solution approaches better.
  • Your free access to these practice problems lasts 30 days and your preparation here is completely self-paced.
  • If the code area contains the function signature, just complete the function alone, we'll take care of the main function, headers, etc.
  • If you have questions about how to use the tool, check out the first question in the list, which will have some useful FAQs.

Participation in this prep tool is optional, but we hope it will help you prepare for your interview. Please note that if you do decide to participate, Facebook will receive information about whether you used the experience, what questions you tried, how far you progressed, how much time you spent, and any feedback that you provide during the process.

Please be assured that this will not influence the outcome of your application as Facebook will only use this information for the purposes of research and improvement of the prep material. 

If you're in the EU, or are applying for a position in the EU, and would like to know more about how we collect and use your information please see the Candidate Privacy Statement or reach out to your recruiter. 

 

Have fun preparing!

Try Sample Test

Sections

There are 4 sections that are part of this test.
number
section
questions
1
Welcome to FB Coding Prep! Try these first...
5
2
More Problems to Solve
14
3
If You Have Time, Try These
24
4
Some Harder Problems
7

Questions

Feel free to choose your preferred programming language from the list of languages supported for each question.There are 50 questions that are part of this test.
Question IndexesQuestion Types
Q1
Subjective Question
Q2
Q4 - Q5
Q7
Q10
Q12
Q20
Q22 - Q23
Q26
Q31
Q36
Q46 - Q47
Coding Questions19 languages allowed: c, cpp, cpp14, csharp, erlang, go, haskell, java, java8, javascript, kotlin, objectivec, perl, php, python, python3, ruby, scala, swift
Q3
Q6
Q8 - Q9
Q11
Q21
Q25
Q27 - Q29
Q32 - Q35
Q37 - Q41
Q44 - Q45
Q48 - Q50
Coding Questions21 languages allowed: c, cpp, cpp14, csharp, erlang, go, haskell, java, java8, javascript, kotlin, objectivec, perl, php, pypy, pypy3, python, python3, ruby, scala, swift
Q13 - Q14
Coding Questions7 languages allowed: c, cpp, cpp14, java, java8, python, python3
Q15
Q17 - Q18
Coding Questions23 languages allowed: c, clojure, cpp, cpp14, csharp, erlang, go, haskell, java, java8, javascript, kotlin, lua, objectivec, perl, php, pypy, pypy3, python, python3, ruby, scala, swift
Q16
Coding Question11 languages allowed: c, cpp, cpp14, csharp, java, java8, javascript, pypy, pypy3, python, python3
Q19
Coding Question13 languages allowed: cpp, cpp14, csharp, go, java, java8, php, pypy, pypy3, python, python3, ruby, scala
Q24
Coding Question21 languages allowed: c, clojure, cpp, cpp14, csharp, erlang, go, haskell, java, java8, javascript, kotlin, lua, objectivec, perl, php, python, python3, ruby, scala, swift
Q30
Coding Question18 languages allowed: c, cpp, csharp, erlang, go, haskell, java, java8, javascript, kotlin, objectivec, perl, php, python, python3, ruby, scala, swift
Q42
Coding Question20 languages allowed: c, cpp, cpp14, csharp, erlang, go, haskell, java, java8, kotlin, objectivec, perl, php, pypy, pypy3, python, python3, ruby, scala, swift
Q43
Coding Question18 languages allowed: c, cpp, cpp14, csharp, go, java, java8, javascript, objectivec, perl, php, pypy, pypy3, python, python3, ruby, scala, swift
Try Sample Test