Greedy algorithm problems in Python
Take the best step now and check that it is enough: greedy problems in Python, with tests that check your solution.
Beginner
Intermediate
- 58. Cookies for ChildrenMake as many children happy as the cookie jar allows60 XP10 min
- 69. Jump to the EndIs the last stepping stone within reach?65 XP10 min
- 93. Most Meetings in One RoomSqueeze as many bookings as possible into one meeting room75 XP14 min
- 302. Fewest Arrows to Pop the BalloonsBalloons cover a long wall. How few shots will pop every one of them?70 XP14 min
- 306. One Truck per TownCut a line of parcels into as many truckloads as the towns allow70 XP14 min
Advanced
- 128. Fewest Jumps to the EndReach the last square in as few hops as possible120 XP20 min
- 134. Fuel Stops on a Ring RoadWhere should a road trip start so the tank never runs dry?125 XP22 min
- 142. Largest Number from PiecesLine the numbers up to spell the biggest number possible130 XP22 min
- 163. Tasks with a CooldownHow long does the machine need when repeats must wait?150 XP30 min
- 386. Gold Stars in a RowMore stars than your neighbour if you scored higher, using as few as possible140 XP25 min
- 399. Rebuild the Photo LineEveryone remembers how many taller players stood ahead. Rebuild the line145 XP30 min
- 431. No Twin NeighboursRearrange the letters so that no letter sits next to its twin175 XP35 min
Expert
- 438. Fewest Stops Across the DesertA rally car, a desert and a trail of fuel depots: how few stops will do?210 XP35 min
- 450. Stamps for Every PostageHow few new stamps let you pay every postage exactly?220 XP35 min
- 457. Most Courses Before Their DeadlinesSo many online courses, so little time: how many can you really finish?230 XP40 min
- 486. Hire the Cheapest CrewEveryone paid by skill, nobody below their asking price: what does a crew cost?260 XP50 min
Other topics
- Python Basics
- Strings
- Lists
- Dictionaries and sets
- Loops
- Functions
- Math
- Sorting and searching
- Two pointers
- Sliding window
- Stacks and queues
- Recursion and backtracking
- Dynamic programming
- Graphs
- Trees
- Bit manipulation
- Classes
- Iterators and generators
- Parsing
- Simulation
- Python idioms
- Regular expressions
- Codes and ciphers
- Working with data
- Grids and matrices
- Geometry
- Games and puzzles
- Heaps
- Data structures
Or see every challenge, with study plans, today's challenge and duels.