TURVO Hiring Challenge | Online Assessment Question | On-Campus (2021)

Question · Posted Jun 2026

Problem: Number of Steps to Reduce a Number to Zero Given an integer num, return the number of steps required to reduce it to zero. Rules: If num is even, divide it by 2. If num is odd, subtract 1. Example Input num = 14 Output 6 Explanation 14 → 7 → 6 → 3 → 2 → 1 → 0 Total steps = 6

The full answer & interview discussion are available to premium members.

Log in Create a free account