Facebook | Phone Screen | Valid Palindrome & Sort String

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2019-10-25Added By Anonymous
Source: Link

Company: Meta (Facebook)
Role: e3, e4
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

45 min Interview over the phone. 5 minutes of introduction. 35 minutes of coding. 7-8 mins of questions

Question 1:
https://leetcode.com/problems/valid-palindrome-ii/
I was able to solve this within 10 minutes.

Question 2:
https://leetcode.com/problems/custom-sort-string/
This one took me a while. I first gave a brute force solution(n^2) then I had time so he asked me to improve it. I gave (n+m) solution later. It took me 20-25 mins in total to come up with both of these solutions.

Do you guys think I made it to the onsite based on this? I was able to provide correct time complexities each time he asked me. The only issue I can think of is it took me a while to come up with the (n+m) solution, but finished both questions with 5 minutes to spare. We talked and discussed for 7-8 minutes in the end.

Comments