Ayu-hack / Hacktoberfest-Contributions

This repository helps beginners contribute to open source and participate in Hacktoberfest. We welcome all pull requests (Python & Java), prioritize genuine contributions, and promote good first issues! #hacktoberfest2022 #hacktoberfest2023 #hacktoberfest2024
20 stars 51 forks source link

Koko Eating Banans (using Binary Search) #61

Closed pankaj0695 closed 1 month ago

pankaj0695 commented 1 month ago

Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours.

Koko can decide her bananas-per-hour eating speed of k. Each hour, she chooses some pile of bananas and eats k bananas from that pile. If the pile has less than k bananas, she eats all of them instead and will not eat any more bananas during this hour.

Koko likes to eat slowly but still wants to finish eating all the bananas before the guards return.

Return the minimum integer k such that she can eat all the bananas within h hours.

Example 1: Input: piles = [3,6,7,11], h = 8 Output: 4

Example 2: Input: piles = [30,11,23,4,20], h = 5 Output: 30

Can you please assign me this issue?

github-actions[bot] commented 1 month ago

πŸ‘‹ Thank you for raising an issue! We appreciate your effort in helping us improve. Our team will review it shortly. Stay tuned!

Ayu-hack commented 1 month ago

Assigned. There are more repos where you can make pull requests, and your contributions will definitely be accepted! They are also part of Hacktoberfest 2024. Don’t forget to tag me in your LinkedIn certificate post if possible. Thank you! πŸ˜„

πŸ‘‰ Do follow my GitHub and connect with me on LinkedIn! ⭐ Also, don't forget to star these repos to stay updated for next year's Hacktoberfest!

anshika-75 commented 1 month ago

I have done necessary changes and its added succesfully @Ayu-hack .kindly merge my PR for #61