- Published on
Meta | E5 | London | reject
- Author
- Shared Anonymously
- Screen:
problem1:
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
problem2:
"abbba" => "aa" => ""
"aba" => "aba"
"abb" => "a"
"abcddcba" =>
remove duplicates
After 2 days got a call for virtual onsite
Onsite
-
coding 1:
-
Find K closest planets to a star knowing the location of the star and all the planets in the system.
-
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.
I/P: [1,4], [2,5], [9,12], [5,9], [5,12] O/P: 5
Unfortunately was not able to give the optimal solution for this, which I think is the reason for rejection
-
Coding 2:
- Ocean view
- Given a string that can contain parentheses, return a string with balanced parentheses by removing the fewest characters possible. You cannot add anything to the string. If there are multiple possible solutions, you can return either of them.
Was able to solve both questions optimally
-
System design:
seats booking systems with real notification to the waiting users for the same seats
was able to solve the problems and had a good discussion, interviewer seems happy. -
Behaviour: Typical conflict situation, a project and responsibilities, disagreements. etc
It was nice discussion, even the interviewer said these are some good stories.
unfortunately, after 7-8 days got the email the I was not able to clear the onsite and they won't be able to provide the feedback. But I think it was the coding round only, who knows. But really felt sad :(