EdocGram
Home
(current)
Topics
EdocAI
Code Editor
HTML
Javascript
PHP
Python
Python AI Code Editor
More
Contact
About
Privacy Policy
Terms and Conditions
Log In
Topic: Greedy Algorithm Problem / Level: intermediate
Problem:
You are given a list of people with weights and a boat with a maximum weight capacity. Find the minimum number of boat trips required to transport all people.
More Problems
Given an array of tasks and their completion times, find the minimum time required to complete all tasks using two processors where tasks are assigned greedily.
You are given an array of integers representing the energy required to move between stones on a river. Find the minimum energy needed to reach the last stone.
Given a list of buildings, each with a start and end time, find the maximum number of buildings that can be constructed without overlapping construction times.
You are given a list of trains arriving and departing at a station. Find the maximum number of trains that can be accommodated on the station’s platforms without overlap.
Given a set of items, each with a weight and a value, maximize the total value you can carry in a knapsack with a limited capacity.
You are given a list of events with start and end times. Find the maximum number of non-overlapping events that can be attended.
Given a list of tasks with start and end times and a number of workers, assign the tasks to the workers so that no worker has overlapping tasks, and the total number of completed tasks is maximized.
You are given a grid where each cell represents a point on a 2D plane. Find the minimum path sum from the top-left to the bottom-right of the grid, moving only right or down.
Python
Language
Editor
Run & Output
Save
AI Code Generate
AI Test Case
Run the code to see the output here...