Permutation Check and Integer-Exponent Power

Asked at Tesla · Coding Questions · Difficulty: Medium · Last asked Jul 25, 2025

Two small functions that are often asked together: check whether a list is a permutation of `0..n-1`, and raise a floating-point number to an integer power quickly.

Loading the problem…