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
-
Divisors
Finding the divisors of an integer can be done in many ways. Simply looping over all the possible divisors of N gives an O(N) solution, which is far too slow. However notice we only need to loop up to sqrt(N) since each factor pair has exactly one factor <= sqrt(N) and another one >= sqrt(N),…
-
C++basic
C++ is a popular programming language that can be used to create many high level applications. It also happens to be the most popular programming language for competitive programming due to its high speed and lower memory usage. It’s an extension of the C language, with a main difference being that it supports both objects…
-
Chapter 3
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…
-
Chapter 4
Phi Function – 3 Euler’s Totient Function (N), also known as the phi function, computes the number of integers less than equal to N that is also coprime to N. Two numbers are coprime if their GCD equals 1. First note that if some integer P is prime, then (P) = P – 1 Also…
-
Chapter2
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…
-
Chapter 1
Common C Programming Mistakes and Solutions Not Initializing Variables Reason: Uninitialized variables contain random values, leading to unpredictable behavior.Severity: High. This causes uncertain program behavior and hard-to-debug errors. Example: int main() { int a; // a is uninitialized printf(“%d\n”, a); // prints random value return 0;} Solution: Always initialize variables. int main() { int a…
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.