This is a repository of the LeetCode problems I have started solving in 2020. An attempt has been made to use C++ with modern features. Since this is an attempt at learning, some initial solutions might lack some awesome modern C++ idioms. They will improve them as I revisit some of those constucts/problems.
Once in a while, when I find an awesome algorithm which is a little hard to understand, I try to explain it in a discussion post. Linking all those here (in a sorted order).
- If
pSomething
is of typeint
, that means it's a moving index - Binary searches use
lo
,hi
andmid
for low, high and middle elements