Screening Round
Questions:
- Kth largest element in the array.
- [Subarray sum equals k](https://leetcode.com/problems/subarray-sum-equals-k/description/.
Candidate's Approach
- For the first question, the candidate provided a MinHeap solution.
- For the second question, the candidate used a cumulative sum solution.
Interviewer's Feedback
The candidate was rejected, as the interviewer was looking for more optimized solutions, specifically Quick Select for Q1 and using HashMap for Q2.
Follow-up Questions
- Can you dry run your code for the given example?
- How would you test your code?
- My answer: check for boundary cases like empty array, null values, invalid chars in integer array.