Problem 1387 · Medium

Sort Integers by The Power Value

Memoize the steps each number needs to reach 1, then sort the range by that power and break ties by value.

Open the interactive visualisation