InterviewSolution
Saved Bookmarks
| 1. |
Which of the following methods can be used to find the sum of digits of a number?(a) Recursion(b) Iteration(c) Greedy algorithm(d) Both recursion and iterationThis question was posed to me in final exam.My enquiry is from Sum of Digits of a Number using Recursion in chapter Recursion of Data Structures & Algorithms II |
|
Answer» RIGHT answer is (d) Both RECURSION and iteration For EXPLANATION: Both recursion and iteration can be used to FIND the sum of digits of a NUMBER. |
|