---
title: "Discussion on \"Find Minimum Sum of price required to select  atleast M distinct values from array else return -1\" | Hashnode"
description: "Discussion on \"Find Minimum Sum of price required to select  atleast M distinct values from array else return -1\". 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..."
url: "https://hashnode.com/posts/find-minimum-sum-of-price-required-to-select-atleast-m-distinct-values-from-array-else-return-1/63e9cadc2d358568b92f25e7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Find Minimum Sum of price required to select atleast M distinct values from array else return -1](https://coder152.com/find-minimum-sum-of-price-required-to-select-atleast-m-distinct-values-from-array-else-return-1?utm_source=hashnode&utm_medium=feed)

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...

Feb 13, 2023 · 4 min read · coder152.com  
Read the article

-   [#array-problems](https://hashnode.com/tag/array-problems)
-   [#competitive-programming](https://hashnode.com/tag/competitive-programming)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#data-structure-and-algorithms](https://hashnode.com/tag/data-structure-and-algorithms)
-   [#minimum-sum-of-price](https://hashnode.com/tag/minimum-sum-of-price)

## Written by

[Prince Kumar](https://hashnode.com/@crewx152)

@crewx152

  
[View profile](https://hashnode.com/@crewx152)

I am currently doing my B.tech from Krishna Engineering College

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
