Meta E5 | Coding Maybe I have over-engineered the solution

Anonymous User
685
Feb 02, 2026
Feb 03, 2026

👋Hi everyone, just sharing since this community helped me a lot

Meta has always been my dream company. I felt so stressed and couldn't sleep the night before.

During the interview, I was running on 4 hours of sleep but caffeinated enough to be functional. The interviewer started with a super short intro and then jumped straight into a string manipulation problem.

Details

first question:
The question was typical Meta style, not too hard once you realize the approach, but tricky details and worth practicing if you can.

I was asked a variation of a substring search problem, where I had to find the shortest substring that fit the input constraints.

I walked through the O(n²) brute force ("check every substring") but mentioned we could do better. Pivoted to a sliding window approach and used a hash map to track frequencies which was O(n).

talked through some edge cases like what I would do if the inputs were empty or there were no valid results.

I saw this problem online already here so that definitely made things easier:
https://offerretriever.com/questions/24

second question:
I got asked this leetcode question: https://leetcode.com/problems/random-pick-index/description/

I felt like the interview went pretty well, waiting for the result now.

Comments (2)