I think you are mislead here. I was trained by Facebook for their interview loop and yes, these are the kind of questions interviewers might ask (with the caveat that the middle of the linked list problem would be formulated as "given a list of items, find the middle"). But they are not the only ones.
A FB interview loop consists of a series of discrete interviews, starting with a phone screening (or two, for PE), followed by on site interviews consisting of coding tests, architecture tests, behavioural tests etc.
The coding tests usually consists of questions like "given foo, write a function that does bar". The questions are designed to extract a number of signals from you, including "do you know the language you picked", "did you pick a good language for the question asked", "how fast can you provide a solution". After you provided the initial solution, you might be asked variations of the question, like "given infinite memory and limited cpu, how will your approach change" or even point you to possible improvements. This is not a pass/fail test, just a way to extract some info about your capabilities. At the end of the loop, all feedback is collected and a panel will decide if you will get an offer or not. You might be bad at algorithms, but providing you know your way around the language(s) you picked, show at least a basic level of problem solving and did good in other fields, you will get an offer.
Imho, if you don't get an offer from Facebook, it means you are really bad or not enough experience. Luckily the recruiter will let you know the areas where you need improvements.
I worked at Google and I failed onsite interview at FB once. I guess I’m too bad as I have plenty of experience and didn’t get an offer. Could be I came across as an arrogant asshole, as I was itritated by questions I was asked and folks I met (was told that one group will do an interview, but was talking to engineers with 5 years in the industry and the only company they worked was FB)
When I interview, I never ask questions from the book, no coding on the whiteboard. Those questions answer only 1 questions - how much free time you have to prepare for them.
A FB interview loop consists of a series of discrete interviews, starting with a phone screening (or two, for PE), followed by on site interviews consisting of coding tests, architecture tests, behavioural tests etc.
The coding tests usually consists of questions like "given foo, write a function that does bar". The questions are designed to extract a number of signals from you, including "do you know the language you picked", "did you pick a good language for the question asked", "how fast can you provide a solution". After you provided the initial solution, you might be asked variations of the question, like "given infinite memory and limited cpu, how will your approach change" or even point you to possible improvements. This is not a pass/fail test, just a way to extract some info about your capabilities. At the end of the loop, all feedback is collected and a panel will decide if you will get an offer or not. You might be bad at algorithms, but providing you know your way around the language(s) you picked, show at least a basic level of problem solving and did good in other fields, you will get an offer.
Imho, if you don't get an offer from Facebook, it means you are really bad or not enough experience. Luckily the recruiter will let you know the areas where you need improvements.