Facebook | Phone Screen | Valid Palindrome 2 & Vertical Order traversal of Binary Tree

Question 1: https://leetcode.com/problems/valid-palindrome-ii/
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome.
I solved this question in 17 mins. They do not let you run the code so it's important to test your code by hand line by line and talk about Big(O).

Question 2: https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree/
I was very close to finish but there was not enough time left. I did bfs traversal on a tree and hash map to store each node.
You should take 20-30 minutes to finish implementing efficient solution to the problem.

Then after 3 days, I got rejected after I contacted my recruiter about the result. My advice to anyone interviewing with Facebook:
a) you either get 1 easy and 1 medium level question. In such cases, you should finish coding easy level question in max 15 mins and medium level in 20-30 mins.
b) or they might ask you 1 Hard question which you should solve in 35-45 mins.
c) or you might get 2 medium problems. 20-25 mins each.

Best of luck

Comments (5)