Amazon Interview Report
- 0of 0 votes
Answers[Question asked during online Test.]
- Rahul June 18, 2013 in India
Given a list of 'N' coins, their values being in an array A[], return the minimum number of coins required to sum to 'S' (you can use as many coins you want). If it's not possible to sum to 'S', return -1
Sample Test Cases:
Input :
Coin denominations: { 1,3,5 }
Required sum (S): 11
Output :
3| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 4 votes
AnswersWrite a function to search for the existence of a string (target) in another string (str). The function takes two strings as the input and returns the index where the second string is found. If the target string cannot be found, then return -1
- Rahul June 18, 2013 in India| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer String Manipulation
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.