Creativity, Teaching & Engineering
A technical blog sharing programming insights, math exploration, creative learning, and AI-powered education.
Programming Tutorials
Learn algorithms, data structures, and clean problem-solving strategies.
Math & IA Models
Explore creative IB Math IA, calculus models, voting theory, and real-world applications.
Teaching & Blog Writing
Sharing teaching experiences, educational tools, and creative learning methods.
Latest Articles
-
LCA
The lowest common ancestor problem is crucial to solving most tree problems. In a rooted tree, the lowest common ancestor of 2 nodes is the deepest node that is an ancestor of both nodes. If the tree is rooted at node 1, then LCA(4, 6) = 2, LCA(5, 3) = 3, and LCA(6, 1) =…
-
MST
The minimum spanning tree problem is one of the most famous in Graph Theory. It is as follows: Given a weighted undirected graph, find any spanning tree with minimum sum of edge weights. A spanning tree is any subset of edges that forms a tree and contains every single vertex in the original graph. Kruskal’s…
-
Strongly Connected Components
Strongly Connected Components are maximally sized components in directed graphs such that every node in a component can reach every other node. This is a strongly connected component since every node can reach every other node. This is not a strongly connected component since 5 cannot reach 7. Kosaraju’s algorithm splits a directed graph into…
-
CCO ’99 P2 – Common Words
Canadian Computing Competition: 1999 Stage 2, Day 1, Problem 2 Given a sequence of words from a newspaper article and an integer , find the most common word(s). Input Specification Input will consist of an integer followed by data sets. Each data set begins with a line containing and , followed by lines, each containing a word of up to lowercase letters. There will…
-
System of Difference Constraints
Imagine you have N variables x_1, x_2, … x_N. Each of these variables needs to be assigned a value. In addition we have M restrictions of the form x_i – x_j <= Wij. Can we successfully assign values to these variables? In fact we can use something called system of difference constraints programming. We construct…
-
Binary Exponentiation
Binary exponentiation is a way to compute a^b mod (M) where a, b can be very large (on the order of 1e9). Iterating manually b times is too slow, so we must find a faster way. Note that if we know a^2, then we can get a^4 in 1 operation, then we can also get…
A Little About Me
I teach, write, and explore math models, creative coding, and algorithm thinking. My passion lies in using technology to inspire learning.