LeetCode Solutions/LeetCoding Challenge/February 2020 LeetCoding Challenge/Number of Steps to Reduce a Number to Zero.java
<gh_stars>0class Solution {
    public int numberOfSteps (int num) {
        int numberOfSteps = 0;
        while(num != 0){
            if(num%2 == 1){
                num--;
            } else{
                num /= 2;
            }
            numberOfSteps++;
        }
        return numberOfSteps;
    }
}