Common mistakes when implementing Sparse Tables:
Wrong power-of-2 calculation: Use , not .
Off-by-one in second range: The second range starts at , not .
Forgetting to precompute LOG array: Using built-in log functions is slow. Precompute.
Array bounds: The range must fit in the array. Check .
Using for non-idempotent operations: Remember, the overlap trick only works for idempotent ops. Debug by testing against brute force for small inputs.