Algorithm · Netflix · Easy
Human-Readable Time Conversion Problem Description Write a recursive function timer(seconds) that takes a non‑negative integer seconds and returns a human‑readable time string. The string must break the total seconds into months (30 days), weeks, days, hours, minutes and seconds, using the conversions: 1 minute = 60 seconds 1 hour = 60 minutes 1 day = 24 hours 1 week = 7 days 1 month = 30 days Only non‑zero units should appear in the output – with one exception: seconds are…
Checking your access…