Easy Problems1342. Number of Steps to Reduce a Number to Zero1342. Number of Steps to Reduce a Number to ZeroLeetcodehttps://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/ Solutions Code 1function numberOfSteps(num: number): number { let count = 0; while (num !== 0) { if (num % 2 === 0) { num = num / 2 } else { num = num - 1; } count++; } return count; };Last Update: 12:08 - 16 April 2024MathBit ManipulationPrevious509. Fibonacci NumberNext1480. Running Sum of 1d ArrayOn this page