Given a non-negative integer num,
keep adding its digits together until the result is a single digit,
then return that single digit.
Input: num = 38 Steps: • 3 + 8 = 11 • 1 + 1 = 2
Output: 2
Input: num = 0 No addition needed.
Output: 0
Accepted:
Submission: