Number Theory Interview Patterns
6 min read GCD and LCM Euclidean algorithm: gcd(a,b) = gcd(b, a%b), base case gcd(a,0) = a. Time O(log min(a,b)). LCM: lcm(a,b) = […] Read article
6 min read GCD and LCM Euclidean algorithm: gcd(a,b) = gcd(b, a%b), base case gcd(a,0) = a. Time O(log min(a,b)). LCM: lcm(a,b) = […] Read article
7 min read Core Probability Concepts Probability questions test your ability to reason about uncertainty and expected behavior. Three concepts appear repeatedly in Read article