In this chapter I shall give you some tips on how to solve coding interview questions.
- Always first try to come up with brute force approach.
- Always think out loud so that interviewer will know your thought process.
- Ask doubts/ questions related to the problem that they have given to you.
- After you come up with brute force solutions, calculate and write down the complexity of the solution.
- Then try to optimize the solution.
- While solving the problem, it is always rood to solve with simple and short input and try noticing a pattern.
- This will help to know if the question can be solved in DP or backtracking.