Once you have read the question properly there are two possible scenario. To improve your problem-solving skills, it’s important to ask certain questions. These questions help you think better and become more skilled in Data Structures and Algorithms (DSA). How do I know this? Well, I landed a job as a Software Development Engineer (SDE) right after graduating from a tier 3 college, thanks to off-campus recruitment.
Able to think about best solution
- What made me think this way?
i) It was based on pattern I know?
ii) Did I see a sneak peak the solution?
iii) Did I just figure it out?
iv) Have I solved problem before? - Why did I think in a particular way?
- What did I learn from this? What patterns or lessons can I take away?
Not Able to think about best/ right solution
- Why couldn’t I think of the best way?
- What made them (solution writer) to think in right way and how can I think in such way?
- Why couldn’t I do what I needed to do?
i) Lack of knowledge about that topic/ pattern?
ii) Was I not good enough at coding?
iii) Was I not thinking clearly? - What mistakes did I make, and why? How can I avoid them next time?
For example, here are some things I noticed about myself when I was practicing:
1. I often stick to one approach too quickly, limiting my options.
2. I sometimes trust patterns/ intuition without understanding why they work.
3. I occasionally misunderstand the problem.
4. I struggle to recognize problems that can be solved with recursion.
By thinking about these reflections and working on them, you can get better at DSA and problem-solving.