Round 1
Questions:
-
Given 2 strings, pattern = f36, s = focus, return true/false.
LeetCode Problem Link -
Given a sorted array and a target, find the number of occurrences of the target.
Target = 1, arr = [0,1,1,2,2,3].
LeetCode Problem Link
Candidate's Approach
- For the first question, the candidate provided an optimal solution.
- For the second question, the candidate initially solved it using a brute force method and discussed an optimal binary search approach, including looking at both the left and right sides of the array. However, they missed one logic and felt they had covered about 80% of the solution.
Interviewer's Feedback
No feedback provided.