Find Minimum Sum of price required to select atleast M distinct values from array else return -1
Feb 13, 2023 · 4 min read · We will be given two arrays having n elements from which one array values [] will be the collection of values and another array price[] will be the collection of prices. We have to select the m distinct values such that the sum of the price will be m...
Join discussion