Available question text
Given a list of ice-cream prices and a budget, maximize the number of bars you can buy by greedily taking the cheapest items first. Because costs are bounded, use counting sort (a frequency array) to iterate prices in ascending order efficiently and accumulate purchases until the coins run out.
Related questions
Continue with questions that share topics or the same question type.
- Absolute Difference Between Maximum and Minimum K Elements
Coding
- All the Pairs With the Maximum Number of Common Followers
Coding
- Average Salary Excluding the Minimum and Maximum Salary
Coding
- Binary Tree Maximum Path Sum
Coding · Binary Tree · Depth-First Search · DP on Trees
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1833. Maximum Ice Cream Bars
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source