Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1342. Number of Steps to Reduce a Number to Zero
Count how many operations it takes to reduce a nonnegative integer to zero if you must divide by 2 when it's even and subtract 1 when it's odd. This can be done by simple simulation or more efficiently with bitwise reasoning (constraints: 0 ≤ num ≤ 10^6).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.