Some SOP we can follow when we practice leetcode:
- Solve 1 question in 20 mins
- 2 mins for gathering all requirements and asking clarifying questions from the interviewer
- Approx 8–10 mins for coming up with valid solution to the question, discuss with interviewer about your solution, trade-offs, the time and space complexity.
- 5 mins for dry run(sample test cases) along with discussion with the interviewer
- Given an array, especially for DP solution, don’t forget to clarify the range of numbers and how are they distributed?
Tips:
- Do not mumble to yourself or keep silent when thinking
- Rectify any bugs in your code before the interviewer points it out.
- Aim to solve as much independently as possible, ideally with as few hints as possible.
- Always take the initiative in the interview, and treat it like a technical discussion.