Home
Elapsed
Cancel

Python: Cross-folder import

(For Python 3.7) Suppose you have a simple project which has the following folder structure: NewProject/ tools/ core.py workflows/ preprocessing/ cleaning...

Writing Tree traversal for Backtracking

Backtracking as orderly enumeration Backtracking searches all the possible solutions in the solution space in a systematic(orderly) way. It could provide an orderly enumeration for a general combi...

Geometric Sequence Sum

Illustration of Kosaraju's strongly connected components algorithm

Kosaraju’s algorithm uses the DFS stack to determine the topological sorting of the strongly connected components of a directed graph. Complexity: \(O(|V|+|E|)\) (Two DFS; Creating components as h...

Proof of Leetcode 11 "Container with most water"

The solution to Leetcode “Container with most water” is a classic two-pointer/greedy algorithm. It sets up the two pointers at the left-most and right-most bar. Then, at each time, it moves the po...

Tail Recursion

Each call from the recursion function will initiate its downstream calls, with this call as the “root”. The global root is the first call of the function. def f(n): # root call ... f(n-...

All-in-one MySQL techniques (beginner-intermediate)

Below is the copy of the gist project of my study notes for MySQL. The actual total study time is approximately ~20hrs, including my past experience with SQL and a weekend’s practice on Hackerrank....