← TechAlgorithmic Archive · C++
LeetCode
Mathematical formulations, visual state-space reductions, and step-by-step C++ implementations of algorithmic problems.
Solved Writeups
2
Primary Language
C++20
Methodology
Math + Visual + Code
ProblemComplexity · Language
#0001
Two Sum
EasyTime: O(n)Space: O(n)C++
Algebraic reduction from an O(n²) upper-triangular Cartesian search to an O(n) single-pass inverse hash table lookup.
#Array#Hash Table
Read breakdown →#0002
Add Two Numbers
MediumTime: O(max(m, n))Space: O(1) auxC++
Linear lockstep traversal over base-10 digit sequences in reverse order with inductive carry propagation and sentinel node allocation.
#Linked List#Math#Recursion
Read breakdown →