LeetCode CLI helper for python.
- Generate testing files for test locally using pytest.
- Provide common algorithm and data structure modules for easy prototyping.
- Divide and Conquer: fastSelect, fastMultiply, mergeSort, quickSort, binary search
- Dynamic Programming:
- Graph: BFS, DFS, Dijkstra, connected components, Topological Sort, Floyd Warshall
- Random
- Backtracking
- Math
- gcd, lcm, coprime, gen_primes, pow
- Diff Array
-
instance method
update(i, val)
query(i, j)
-
instance method
update(i, val)
query(i)
-
build_root
: return TreeNode instance from given list. -
instance method
__str__
: print tree in bfs (ignore None node).pre
: return pre order of DFS traversalpost
: return post order of DFS traversal
build_head
: return ListNode instance from given list.__str__
: print linked list.value_eq
: value based equality check.
- max heap pq
git clone https://github.com/nickyfoto/lcpy.git
pip3 install ./lcpy
Install in editable mode
pip3 install -e ./lcpy
generate module and test template
lcpy cp <some_file.py>
- substring search, KMP
- deal with cp file not exist
- cannot cp design problem
- Bit Manipulation
- Concurrency
- ShellSort
- Red-Black BST, B-Tree
- Convex Hull
- Sparse Vectors
- Max Flow
- Redix Sorts
- Regular Expression
- name 'List' is not defined
- cannot generate testing without adding
pass
. - add tree visualizer function
- generate testing file for non
class Solution
problem.