Solution 1 Traverse

  • t-complexity: $O(1)$

  • s-complexity: $O(1)$

Convert to bianry and convert back.

Last updated