I keep notes for Leetcode problems I solved.
# Why I Am Doing This
While most people do Leetcode to find a (better) job, I do it to review my algorithm knowledge, improve coding skills, not feel bored, and may find an SDE job.
Other than these reasons, I also learned
C++ along the way because there are many solutions on Leetcode discussions written in the language.
# Problems I solved (??? should organize once migrated)
- Longest Common Prefix
- Longest Palindrome Substring
- Shortest Palindrome
- Two Sum
- Longest Common Subsequence
# Checklist I followed
This is the checklist I followed for each blog:
- state the problem
- follow up or note if any
<!-- more -->tag for better preview
- problem (and article) links
- code snippet if any
- title to summarize
- elaboration of algo
- time&space complexity
- further notes
# Languages I used
I previously used
Java extensively, because one of my best friends said Java gives you a better time to explain the underlying data structure.
I was actually learning the language and am now reading many solutions in this language. However, C++ is known for a steep learning curve, and I don't think it's a good idea to write my solution while checking how to do a thing in it.
# Python 3
My officially first programming language is Python 2, from which I learned if, for, while, simple but useful data structures like list and map, and finally even a little OOP before learning Java. Several years later, Python is extinct and Python 3 inherits the speed, simplicity and elegance.
Thus, now I am using Python 3.
# Edge Cases - A Note for Myself
ALWAYS watch out for the edge cases with typical ones including but not limited to:
- empty string
- empty array