Read ; Write ; Upload ; Image(252) ; Threads(139) ; Settings ; Profile ; Boxes ; Help
Banana Lounge Unofficial Fan Forum

Count #
Items on page: 3
2024-05-12 #
file_hash item_title author_id cart
c048b0d7 title: Koko Eating Bananas Guest +cart
aca6752b https://leetcode.com/problems/koko-eating-bananas/description/ Guest +cart
85fedb0a 875. Koko Eating Bananas Guest +cart
875. Koko Eating Bananas #
#parent

>>Koko Eating Bana

875. Koko Eating Bananas
Medium
Topics
Companies

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

Example 3:

Input: piles = [30,11,23,4,20], h = 6
Output: 23



Constraints:

1 <= piles.length <= 104
piles.length <= h <= 109
1 <= piles[i] <= 109



; Guest; 85fedb0a; like ; +cart
https://leetcode.com/pro #
#https

[https]

Koko Eating Bananas

; Guest; aca6752b; like ; +cart
title: Koko Eating Banan #
#parent; #title

>>Koko Eating Bana

title: Koko Eating Bananas

no timestamp; Guest; d549b798; like ; +cart
query.sql #


		SELECT
			item_flat.file_path file_path,
			item_flat.item_name item_name,
			item_flat.file_hash file_hash,
			item_flat.author_key author_key,
			item_flat.child_count child_count,
			item_flat.parent_count parent_count,
			item_flat.add_timestamp add_timestamp,
			item_flat.item_title item_title,
			item_flat.item_score item_score,
			item_flat.labels_list labels_list,
			item_flat.item_type item_type,
			item_flat.item_order item_order,
			item_flat.item_sequence item_sequence
		FROM
			item_flat
	 
		WHERE
			file_hash IN (
				SELECT file_hash
				FROM item_flat
				WHERE
					item_score >= 0 AND
					(
						SUBSTR(DATETIME(add_timestamp, 'unixepoch', 'localtime'), 0, 11) = '2024-05-12'
						OR
						file_hash IN (
							SELECT file_hash FROM item_attribute where attribute = 'date' AND value = '2024-05-12'
						)
					)
				)
				AND (
					file_hash NOT IN (
						SELECT file_hash FROM item_attribute WHERE attribute = 'date' AND value <> '2024-05-12'
					)
					OR
					file_hash IN (
						SELECT file_hash FROM item_attribute WHERE attribute = 'date' AND value = '2024-05-12'
					)
				);
			

Cart #
Paste
Clear
Add All
^
JavaScript #
Notice #
This server is set to ASCII mode.
Some characters may not be printed.
Non-ASCII characters removed during page printing: 6