Facebook interview learnings
Phone Interview,
5 mins : Introduction, 35 mins: coding, 5 mins: Questions.
Question 1: https://leetcode.com/problems/powx-n/
Question 2: https://leetcode.com/problems/range-sum-of-bst/
After code completion, Interviewer said, "Right on time, 40 mins"
Good things
For first question linear solution, right in a min, optimal solution, within 2 mins, with whiteboard testing
Able to code the linear solution : question 1
Not able to code log solution fully : question 1 (optimal), interviewer asked to move to next question
Interview said, we have less time for question 2, 10-15 min, but able to come up the solution with brute force and optimal with constant space
Communicated the time and space complexity for question 1 and 2: even verified as we cannot make it better
Need to take care
Haven’t written or discussed the test cases : though code is correct : need to call it out
Edge cases, i.e for negative number
Haven’t clarified constant space as a storage v/s recursion
Didn’t call out the iterative v/s recursive approach for question 2
Keep an eye on time must
Facebook interview analysis :
Interview doesn’t speak a single word, very limited, i.e. can we do better space complexity?
Interviewer says, how many question at start they gonna ask, or ask him/her.
Very particular about code completion in time
Rejection !!