Steps to solve a new problem:

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