[ INFO ]category: Behavioral · Onsite difficulty: hard freq: first seen: 2024-04-04
[HARD][ONSITE]OnsiteE4Rejected
$catproblem.md
Meta | E4 | Full Loop
Coding Round 1:
Simple Variation of Missing Ranges:
If the number of missing numbers is <= 2, append them as a number; otherwise, append the range of missing numbers.
Return the max consecutive characters in the string:
Example: "This is a string" -> no char appears consecutively; hence return ['T', 'h', 'i', 's',.....'i', 'n', 'g']
"Thiss is aa ssttrring" -> ["ss", "aa", "ss", "tt", "rr"]. Note that the output should be in order.
Coding round 2:
Find a local minima in an array.
I was prepared for Find Peak Element, but the twist in the problem threw me off.
Design an API getOne(start_idx, end_idx) which will return the number of 1's between the two indices from an array consisting of only 0's and 1's e.g., [0,1,1,0,0,0,1,1]. The call should be completed in constant time.
The interviewer was helpful and hinted at prefix sum, but I was not able to code it.
System Design - design a ride-share with some variation.
These interviews are nerve-wracking. Make sure you understand the problem and not just memorize or try to solve them from memory.
I prepared from top 50 questions, but the variations in the actual interview can really throw you off. Best of luck to those who have their onsite coming up.