Tomzik's blog

By Tomzik, history, 7 years ago, In English

Has anyone here done interviews with Facebook? I know they ask applicants to solve algorithmic problems, how do their problems compare with the ones of codeforces? what type of difficulty to expect? Do you think codeforce is a good training resource or should I look somewhere else?

Thanks!

  • Vote: I like it
  • +26
  • Vote: I do not like it

| Write comment?
»
7 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Cracking the Coding Interview is a good way to prepare

»
7 years ago, # |
  Vote: I like it +72 Vote: I do not like it

The problems on Facebook, Microsoft and Google are usually Div2 A and B (hardly C) problems, but sometimes they ask about graphs, tries, and other data structures (that are never present on Div2 ABC).

Nikita_Babenko linked a very good reference to prepare (Cracking the Coding Interview) (don't ignore the first chapters. Explaining your experience listed on your resume is a must on some interviews).

Also https://leetcode.com/ is good to practice for problems since it have problems using on real interviews.

Another thing is mock interviews. If you have teammates, or friends doing the interviews, practice interviewing them. Explaining the solution clearly is what you have to do during interviews. Some problems can be hard (or we tend to be very nervous and don't see the easy way), so try to explain your thoughts. The interviewers usually want to know if you can solve the problems fast, but if you can't they want to know if you can get to the answer with some help. It's natural to not know everything.

Codeforces is not so good of a reference, but solving problems anywhere helps.

And good luck!

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Thanks very much.

  • »
    »
    6 years ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    Are they usually Div2 A and B (hardly C) problems for uni grad full time positions or just internships or both?

»
7 years ago, # |
  Vote: I like it +17 Vote: I do not like it

I've done interviews with Facebook.
I just have a quick tip to add to naumazeredo's great answer,

Be careful with details (such as ambiguity, corner cases, coding style... etc.).
naumazeredo is right about the difficulty of these questions.
However, interview questions are often asked with hidden ambiguities. This might include the size of input, range of numbers, permissible conditions (eg. can a number be used twice?) ...etc..
It's also very likely that these questions will include sneaky corner cases you need to think of before coding. You don't want to write an ugly fix for just one type of corner case.
As for coding style, the interviewers at these big-4 companies will seriously look for signals that indicate whether you're a good developer. So if you're one of those people who use a, b, c as variable names for example, quit doing so during interviews.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks for the tip!

  • »
    »
    2 months ago, # ^ |
      Vote: I like it -17 Vote: I do not like it

    This was really what is needed to be told. As i have solved a handful or problems till this date, I really was feeling something to be missing from the solution that i code, what i used to do is if i get a corner case, fix it seperately and it could be fixed along the code only, but i didn't thought it to be as big of an issue till this date, going to mind this thing forever and will try to keep the same mindset while solving problems! Thanks for the help..

»
7 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

naumazeredo suggested LeetCode. It's a great source, but I want to add somthing, check out this npm cli for leetcode (https://github.com/skygragon/leetcode-cli-plugins). It has plugins, one of them is called 'company' (basically you can filter the problems by the company they were asked). Running smthng like leetcode list -t facebook will give you all the problems asked previously by facebook. If you have money I suggest buying premium for leetcode of course :) Btw, the company tags are for real, those are real problems from interviews, I encountered 3 of them at Palantir and Google.

Good luck

  • »
    »
    7 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Thanks! that's a great tip

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I've been using this plugin extensively for the last couple of weeks. It's very handy.

»
7 years ago, # |
  Vote: I like it +37 Vote: I do not like it

 :thinking:

  • »
    »
    7 years ago, # ^ |
    Rev. 2   Vote: I like it +8 Vote: I do not like it

    What does your comment mean? a couple of months ago, I asked for tips for practicing to reach the next stage on codeforces, and 2 weeks ago I asked for tips for interview practicing. Is there anything wrong or suspicious with my questions?

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it +31 Vote: I do not like it

      I think that's kind of a meme: first you become blue, second you get an interview offer :)

»
7 years ago, # |
  Vote: I like it +10 Vote: I do not like it

I did an interview for Facebook, but the role was actually more like support for their gaming API. I failed the only question I was given: "How can Facebook compete with Steam on PC gaming market?" :)

»
7 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Is CGPA very important to get interview offer in facebook? Is it possible to select for interview in facebook with good coding skill and bad CGPA?

»
7 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Inteviewbit is a good place to practice questions for interview. It's similar to leetcode.

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I_love_Tanya_Romanova might be able to guide you

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +9 Vote: I do not like it

    I'm very happy about working at Google, so I don't have any issues with my previous Facebook rejection :)

    Talking about the original question, the main thing to notice is that I find the idea of doing competitive programming to prepare for interview being quite stupid, and I'd suggest doing deliberate interview preparation instead (at sites like LeetCode).

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      I am still new so, extremely sorry if I say something stupid. I wanted to know if solving problems on codeforces during contests are helpful? I mean there you have to solve questions in given time, so would that not help during interviews?

»
6 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Also, do the big 4 consider students with non-cs and non-electrical undergrad degree to at least give the online test/telephonic round? Do you know of anyone here from non-CS who got a chance to give the interview ?

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    I had an undergrad in Electronics. I switched to CS for my masters. Last year I interviewed with FB for internships and I also got an invite for a full-time interview this year.

    I have noticed that the best way to attract FB's attention is to have hackathon wins on your resume or interesting side projects on github, algorithmic contest good rank (ACM-ICPC regionals good rank for example). Major or GPA doesn't really matter much in this case. Good luck!