Data Interview Questions

133,160 data interview questions shared by candidates

You are given an integer list coins representing coins of different denominations and an integer amount representing a total amount of money. Return the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return {}. You may assume that you have an infinite number of each kind of coin. Example 1: Input: coins = [1, 5, 6, 9, 15], amount = 31 Output: {15:2, 1:1} Example 2: Input: coins = [1, 5, 6, 9, 15], amount = 100 Output: {15:6, 9:1, 1:1}
avatar

Data Engineer

Interviewed at Brave AI Lab

4.7
Mar 24, 2023

You are given an integer list coins representing coins of different denominations and an integer amount representing a total amount of money. Return the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return {}. You may assume that you have an infinite number of each kind of coin. Example 1: Input: coins = [1, 5, 6, 9, 15], amount = 31 Output: {15:2, 1:1} Example 2: Input: coins = [1, 5, 6, 9, 15], amount = 100 Output: {15:6, 9:1, 1:1}

Viewing 1061 - 1070 interview questions

Glassdoor has 133,160 interview questions and reports from Data interviews. Prepare for your interview. Get hired. Love your job.