You are given a 1-indexed integer array
numWays, wherenumWays[i]represents the number of ways to select a total amountiusing an infinite supply of some fixed coin denominations. Each denomination is a positive integer with value at mostnumWays.length.However, the exact coin denominations have been lost. Your task is to recover the set of denominations that could have resulted in the given
numWaysarray.Return a sorted array containing unique integers which represents this set of denominations.
If no such set exists, return an empty array.
1 |
|