Tomzik's blog

By Tomzik, history, 11 months 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  

»
11 months ago, # |
  Vote: I like it +2 Vote: I do not like it

Cracking the Coding Interview is a good way to prepare

»
11 months ago, # |
  Vote: I like it -21 Vote: I do not like it

i think this is not best place to discuss these thing.You can get level of questions from past years at other websites like geeksforgeeks/books etc.

Btw,i interviewed with facebook and was able to get the offer.

»
11 months 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!

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

    Thanks very much.

  • »
    »
    3 weeks 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?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I don't know about Facebook difficulty but Google certainly asks upto div2c or div2(c+d)/2. Only telephonic rounds are div2B hard. Onsites are harder. But like Inishan said, problems may seem simple but made harder with ambiguities. I cite my own example. I was asked a problem about points in a plane for which I assumed the points are integral. RIP me.

»
11 months 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.

»
11 months 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

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

    Thanks! that's a great tip

  • »
    »
    10 months 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.

»
11 months ago, # |
  Vote: I like it +37 Vote: I do not like it

 :thinking:

  • »
    »
    10 months 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?

    • »
      »
      »
      10 months 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 :)

»
11 months 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?" :)

»
10 months 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?

»
10 months 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.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I_love_Tanya_Romanova might be able to guide you

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    He was rejected by Facebook though. I dont think they are too concerned with algorithmic problem solving, and focus on projects and system development knowledge.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why to troll him :(

  • »
    »
    3 weeks 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).

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it -10 Vote: I do not like it

      I'm sorry, I wasn't mocking you about the rejection. I read your answers on Quora about your interview experience, and that's why I said that.

»
3 weeks 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 ?

  • »
    »
    3 weeks 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!

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thank you for great points. Were you talking about SDE internships or ML/DL internships which you got selected to?