leetcode - 1342 Number of Steps to Reduce a Number to Zero JavaScript Solution

Опубликовано: 12 Февраль 2026
на канале: litCode
329
13

simple js solution

Given a non-negative integer num, return the number of steps to reduce it to zero. If the current number is even, you have to divide it by 2, otherwise, you have to subtract 1 from it.