The interviewer asked two DSA questions: LeetCode 1248 – Count Number of Nice Subarrays and LeetCode 621 – Task Scheduler. The round was primarily focused on understanding my problem-solving approach and thought process rather than just writing code.
For LC 1248, we discussed how to identify subarrays containing exactly k odd numbers and how this can be optimised.
For LC 621, we discussed the scheduling logic, how to arrange tasks while respecting the cooldown period, and how to derive the answer efficiently using task frequencies and the maximum-frequency task.
The interviewer asked me to explain my approach first, followed by time and space complexity, edge cases, and possible optimisations.
The interviewer also asked two situational/behavioural questions:
What would you do if you had to change the technology/tech stack in the middle of a project? How would you handle the transition? How would you handle a situation where you are unable to meet a project deadline?
The questions mainly evaluated adaptability, ownership, communication, prioritisation, and how I handle unexpected changes or pressure.