/My_LeetCode_Solutions

In this journey, I'm trying to improve my problem solving skills.

Primary LanguageJava

My LeetCode Solutions

This repository contains my solutions to LeetCode problems. In this journey I'm trying to improve my problem solving skills. The solutions are the simplest not necessarily the most efficient. I hope I learn a lot in this journey, transfer learning to the next problems, and get back to the previous solutions in order to make them more efficient.

✍️ What I've already learned:

  • Don't rush to use for loop (brute force). Think about improving the solution not only answering it.
  • Check discussions and compare your solution with others' solutions.
  • Try to think about the performance. You should think of solving the problem with the most efficient solution.
  • How simple is to write a solution code with high memory usage! Care about memory. It's not always available enough!
  • Try to find new solutions that they don't come to mind in the first look. This way new paths will activate in your mind.
  • There are some nice and smart solutions for a simple problem that you can't even think of it!
  • Consider the real life situations as an important parameter when you're choosing the best solution among some possible solutions.
  • Beware of border cases!
  • A timely and accurate return/exit will save you a lot of execution time.
  • Sometimes the problem is just easier than what you think, and you should only focus.