Number Theory Interview Patterns
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) = […]
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) = […]
Core Probability Concepts Probability questions test your ability to reason about uncertainty and expected behavior. Three concepts appear repeatedly in