experience: < 1year
Onsite Round-1
DSA problem solving round (1 hour)
I was asked some technical questions based on my current work experience.
2 questions were asked which were leetcode medium level.
- 1st question involved writing code as classes and objects (OOP) while using appropriate data structure according to the problem statement.
I gave min heap based solution and the interviewer asked to code the solution and execute it in IDE.
- 2nd question was tricky which could be solved using simple sorting technique.
2 days later I got invite for 2nd Technical round (final round)
Onsite Round-2 (Final Technical Round)
DSA problem solving round (1 hour)
First 10 min involved introduction and questions regarding my current work experience.
2 questions were asked both were leetcode Hard.
- 363. Max Sum of Rectangle No Larger Than K
First I told about brute force approach O(n^4) time complexity, interviewer asked to optimize it.
I was thinking about some approach involving presum and max sum subarray (kadane's algorithm) but couldn't come up with a concrete solution.
- 446. Arithmetic Slices II - Subsequence
I started thinking about approach similar to longest increasing subsequence, wrote the code but couldn't come up with a concrete solution which could cover all edge cases.
No hints were given or communicated that my thought process and approach was in right dirrection by the interviewer. As I checked the solutions after interview I realise my approach was in right dirrection. Need to practice more.