codedecks-in / LeetCode-Solutions

This repository consists of solutions to the problem from LeetCode platform. Subscribe to our Channel for more updates
https://www.youtube.com/c/codedecks
MIT License
821 stars 415 forks source link

Added soln for 3075. Maximize Happiness of Selected Children (Java) #481

Closed RatanKokal closed 4 months ago

RatanKokal commented 5 months ago

Pull Request Template

Description

3075. Maximize Happiness of Selected Children

Each of the children have a happiness value assigned to them. One needs to select the children with maximum happiness in each turn for k turns and return the maximum sum. In each turn the happiness of the children who have not been selected reduces by 1. Note: Happiness can't be negative at any instant

Topics: Arrays, Sorting, Greedy

No dependencies

Put check marks:

Have you made changes in README file ?

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

My solution got accepted on LeetCode.

Make sure all below guidelines are followed else PR will get Reject:

welcome[bot] commented 5 months ago

I can tell this is your first pull request! Thank you I'm so honored. :tada::tada::tada: I'll take a look at it ASAP!