Round 1 (Online Assessment)
Questions:
- DSA (2 Questions)
- Specific question not provided.
- Find Longest Self-Contained Substring
- Work Simulation Assessment
- Behavioural
Round 2 (Technical Interview)
Questions:
-
LP Question:
- Specific question not provided.
- Follow-ups lasted around 20 minutes.
-
House Robber (LeetCode Medium):
- Discussed dynamic programming approach and optimized space complexity.
- Conducted a dry run and explained time and space complexity.
-
Longest Consecutive Sequence:
- You are given a class LongestConsecutiveSequence which exposes a function addNumberAndCompute that accepts a number as an argument.
- This function can be called by the client any number of times as per their liking. After each computation, the function is supposed to return the length of the longest consecutive sequence you have seen till now.
- Test cases:
addNumberAndCompute(1) returns 1 addNumberAndCompute(2) returns 2 addNumberAndCompute(4) returns 2 addNumberAndCompute(3) returns 4
Candidate's Approach
- For the House Robber problem, I provided a dynamic programming approach and optimized the space complexity.
- Initially struggled with the Longest Consecutive Sequence question but received clarification from the interviewer.
- Implemented a minHeap approach and fixed edge cases as they were presented.
- Conducted dry runs on several test cases to validate the solution.
Interviewer's Feedback
- The interviewer seemed satisfied with the approach but did not ask for time and space complexity.
- No specific feedback was provided post-interview.