Interview Questions
Interview Guides
Experiences
Explore
Get started
Sign in
Interview Guides
All questions
/
Coding
Recursive Sum of Digits
Easy
Asked at 1 company
Recursion
Strings
Problem
Examples
Constraints
Problem
Given a non-negative integer
n
, return the sum of its digits using recursion. Do not use loops.
Question
Code
Problem
Examples
Constraints
Problem
Given a non-negative integer
n
, return the sum of its digits using recursion. Do not use loops.
Practice Python
Python 3.10
Open on desktop for the full Python editor with syntax highlighting and autocomplete.
Run code
Submit
Stuck? Get a hint
Past attempts
Up next
Nth Fibonacci Number
Easy
Calculate Fibonacci Number with Memoization
Medium
Reverse Bits of Integer
Easy
Next question
Recursive Sum of Digits | Dataford Interview Questions