My python and C++ solution and thinking for leetcode algorithm questions
After I suffered from Python perfomance limit, I switched to C++.
(Especially when dealing with lists, many wired TLE cases).
Also the lessons for python:
- The shallow copy and deep copy.
- The reference and objects.
- Inner function of method and other memeber functions.