Screen: Problem 1: Input: [4, [5, 6]] Output: 4 + 2 * 5 + 2 * 6 = 26
Input: [8, 4, [5, [9], 3], 6]
Output: 8 + 4 + 2 * 5 + 3 * 9 + 2 * 3 + 6 = 61
Problem 2:
"abbba" => "aa" => ""
"aba" => "aba"
"abb" => "a"
"abcddcba" =>
remove duplicates
After 2 days, I received a call for a virtual onsite interview.
Onsite
Coding 1: 1. Find K closest planets to a star knowing the location of the star and all the planets in the system. 2. You are given n integer intervals [a_i, b_i] on the real axes, and the absolute value of the coordinates is bounded by M. Determine a point that belongs to the maximum number of intervals. Point x belongs to the interval [a, b] if a <= x <= b.
Input: [1,4], [2,5], [9,12], [5,9], [5,12]
Output: 5
I was unfortunately unable to provide the optimal solution for this, which I believe is the reason for rejection.
Coding 2:
I was able to solve both questions optimally.
System design: Seats booking system with real-time notifications to waiting users for the same seats. I was able to solve the problems and had a good discussion; the interviewer seemed happy.
Behavioral: Typical conflict situation, project and responsibilities, disagreements, etc. It was a nice discussion; the interviewer even said these were some good stories.
Unfortunately, after 7-8 days, I received an email stating that I did not clear the onsite interview and that they would not be able to provide feedback. I believe it was due to the coding round, but I am unsure. I was disappointed by the outcome.