[NDA] Facebook | E5 | Telephonic
Anonymous User
2039

Wanted to contribute to the great community irrespective of the result.

As i have signed NDA , will try to give my maximum insights/experience without mentioning the exact questions. Also there are great posts out there in the leetcode forums about the tips and tricks about the facebook interviews. I have read almost everything and applied(for eg. dont explain more about yourself which will effect your coding time, never write brute force code if you feel confident that you can come up with better approach , never make any assumption , think aloud and ask all questions etc )

Nearly 1 yr of prep. I have solved almost 70% of the facebook tagged leetcode problems(sorted by frequency). But still both the questions are not from that.

  1. LC easy level. Array based problem. I gave the brute force instantly and optimal solution in the next two mins. written code and verified in the next 5 mins so almost within 15 mins from the start of the interview i have completed my first question, I got a panic attack while dry run the solution for the interviewer. i have wrongly calculated the numbers and when i try to go back and fix the numbers for the dry run, Interviewer rushed to the next question and i left it there :(

  2. LC medium level. Again Array based problem. My mind didnt come out from the first question panic attack yet. so i have asked interviewer to repeat the question once again. I wanted to give my best here, There are two question in the problem(from the interviewer). How to store the elements optimally interms of space. and how to use the optimally stored data structure to solve the second question. I told my approach within 2 mins for both question. He said fine and told me to write the code. I really fast in writing code. Though im nervous and i managed to write the bug free code and execute well this time. Interviewer asked me what is my space complexity. I said O(1) because i havent used any extra containers or system mem for Question 2. I asked me to verify. i said i didnt use any extra space. he told me look at the function prototype.C'mon i didnt take the input vector by reference(missed &). Interviewer wanted to improve my time complexity. so came up with the optimal approach very instantly which required 3-4 lines modification in the existing code. he asked me to modify. I have modified the code and started dry running my code. he pointed one mistake before i complete the dry run (most painful moment which i never wanted to happen :'( ) . He asked me the current time complexity. i started thinking. when i tell the time complexity , no response from the interviewer. I saw my Wifi stopped working. i restarted my router and connected back. Interviewer said he is done and asked me, any question i have. I asked a usual question with very low tone.

Thinking where i could have done better.

Comments (1)