Facebook | Phone | Find a local minima in an array
15839

Sharing it help leetcode community members

I had phone screening round for which i have shared the interview experience earlier - https://leetcode.com/discuss/general-discussion/848178/facebook-screening-round-follow-up

I had second screening round and again 2 questions were asked. One was pretty standard palindrome ques which I was able to solve within time with optmimal complexity. The next question was array based search problem (which is not from leetcode) and pretty doable. I started with the approach of solving it with linear time complexity and interviewer said to proceed with it. I wrote the code and it passes all the test cases which he provided. He asked for optimizing it and i said I can apply binary search though the problem doesn't says if the given input array is sorted or not. He said how can you apply binary search on non sorted array and said he is ok with linear solution.
I got a reject stating that I was good at coding/ asking clarying question,etc but didn't solve the second question using binary search after getting hint from interviewer. I was surprised from this response from HR as if this is the way interviewer gives hint in a time bound interview, it will be pretty tough to get it :).
My suggestions to others, always go for the optimal solution as FB looks for 100 % perfect solution for both the coding problems.

Few other points (from my experience of 4 problems asked)

  • All the problems were array based or string manipulation one
  • Don't expect that you will always get top 50 FB/ FB tagged problem

I know I got a reject but sharing these tips from my experience so that others can avoid these mistakes if you have upcoming interview.

Comments (14)