Steps to solve a new problem:
- Go to Leetcode etc.
- See if any algorithms are getting applied from Algos for DSA problem and mention same.
- Rememberapproach_should_be_mentioned_first
- Attempt the problem 2 times before checking answer from other sources.
- Once confident with approach andtime_complexity andspace_complexity, writepseudo_code .
- Ifpseudo_code looks okay then write code in preferred language.
- dry_run
- If the logic seems fine afterdry_run
- Execute the code. (If you are ending up executing first then code in notepad first)