This repo contains my thoughts and solutions to the problems in LeetCode.
My motivations of maintaining this repo are to
- Improve my problem-solving skills, i.e.
- Understand a problem
- Come up with one or more brute-force solution(s)
- Optimize the brute-force solution(s)
- Ultimate goal: Design simple, correct and fast algorithms
- Improve my coding skills, i.e. implement robust programs
- Apply my program analysis skills and Discover program analysis insights
- i.e. Summarize and generalize different approaches of reasoning about a program
- Do something meaningful apart from my research
- It is sometimes not efficient to focus on only one task at a time
- Solving LeetCode problems is actually no different than doing research, because the goals of both are to solve problems
- Turn my mindset of working on LeetCode problems from being task-oriented (and one-off) into being explorative and thoughtful (and long-term)
- Thus being more entertaining to myself
- I love thinking about a problem in depth (i.e. generalize/abstract it) and breadth (i.e. understand its connection with other problems)
- Motivate and enforce myself to keep working on LeetCode problems by sharing my progress in a public and competitive environement
- Isn't it nice that I do not have to discover a problem, but that someone has assigned me a problem?
- My job is to come up with a perfect solution
- Keep my draft solutions (i.e. work in progress)
- Share my thoughts with others