Facebook | Phone | Interval List Intersections & Largest BST Subtree
Position: E5
Hello everyone,
I had my FB phone interview today. The call was for 45 minutes and interviewer directly jump on question without any introduction. Now even though I had all 45 min to perform , I felt so stressed that even a very easy question which I even had solved earlier, did not click to me in first go and spent something ~5-10 min in various clarification and edge cases as interviewer has tweaked the question in such way that i felt it lot ambigous. Anyways... Finally I solved in most optimized way and told time complexity and stuff.... She did ask me another question but due to lack of time, we could not go over code and i told her verbally the apporach. I later checked and it was correct approach but not sure if she understood well enough but seems like she did.
I was asked to
a) "find intesection of unsorted non overlapping intervals". wording of question was different though but it drilled down to this only. - I solved with 2 pointer.
b) Largest BST Subtree - I propsed recursive solution ie. find largest in left and right and get max.
I could have solved both question and I consider both of them fairly easy but stressed killed my performance guys". I tried my best though and also couldn't complete the code in given time. did it happen with anyone else where you have solved just 1 question and got through the phone screen? I dont have any hopes :(


