Given a number N. The task is to complete the function convertFive() which replace all zeros in the number with 5 and returns the numb...
Read More
Home / amazon
Showing posts with label amazon. Show all posts
Showing posts with label amazon. Show all posts
Amazon Interview Solution: Power of 2
Given a positive integer N . The task is to check if N is a power of 2 . That is N is 2 x for some x. Input: The first line contain...
Read More
Amazon Interview Solution: Repetitive Addition Of Digits
Question Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. Input: The first line...
Read More
Subscribe to:
Posts
(
Atom
)