Professional Documents
Culture Documents
Write a recursive function that, given a number n, returns the sum of the
digits of the number n.
4. Write a recursive function that, given two strings, returns whether the first
string is a subsequence of the second. For example, given hac and cathartic, you
should return true,but given bat and table, you should return false.
5. Given an array of integers, replace each element of the array with product of
every other element in the array without using division operator.
Example: Input--> {1,2,3,4,5}
Output-->{120,60,40,30,24}