Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.5K+ articles
Misc
8.8K+ articles
Mathematical
7.8K+ articles
Arrays
6.5K+ articles
Competitive Programming
3.3K+ articles
Strings
3.3K+ articles
Greedy
2.1K+ articles
Algorithms
2.0K+ articles
Sorting
1.8K+ articles
Searching
1.7K+ articles
DSA
/
Algorithms
/
Greedy
Greedy
2.1K+ posts
Recent Articles
Popular Articles
Implementation of Optimal Page Replacement Algorithm in OS
Last Updated: 14 January 2025
The Optimal Page Replacement Algorithm is a technique used in operating systems to manage memory efficiently by replacing pages in a way that minimizes page faults. When a...
read more
Greedy
Operating Systems
GATE CS
Memory Management
DSA
Assign Cookies
Last Updated: 26 October 2024
Given two arrays, greed[] and cookie[] such that greed[i] denotes the minimum cookie size wanted by ith child and cookie[i] denotes the size of ith cookie, the task is to ...
read more
Greedy
Sorting
DSA
Maximum Meetings in One Room
Last Updated: 10 September 2024
Givennmeetings in the form ofstart[]andend[], where start[i] is the start time of ith meeting and end[i] is the end time of ith meeting. The task is to find the maximum nu...
read more
Greedy
Sorting
DSA
Maximum Cinema Seat Allocation
Last Updated: 14 June 2024
A cinema has n rows of seats, numbered from 1 to n and there are ten seats in each row, labelled from 1 to 10 as shown in the figure above.Given the array reservedSeats co...
read more
Microsoft
Greedy
Picked
DSA
Common Slot for Meeting of Two Persons
Last Updated: 22 March 2025
You are given two lists of availability time slots, slt1[][] and slt2[][], for two people. Each slot is represented as [start, end], and it is guaranteed that within each ...
read more
Adobe
Greedy
Sorting
Picked
DSA
Difference Between Greedy Knapsack and 0/1 Knapsack Algorithms
Last Updated: 21 May 2024
The 0/1 Knapsack algorithm is a dynamic programming approach where items are either completely included or not at all. It considers all combinations to find the maximum to...
read more
Algorithms
Dynamic Programming
Greedy
knapsack
Algorithms-Greedy Algorithms
DSA
Put Maximum Number of Boxes Into the Warehouse II
Last Updated: 23 April 2024
You are given two arrays of positive integers, boxes[] and warehouse[]. The boxes array represents the heights of some boxes of unit width, and the warehouse array represe...
read more
Arrays
Google
Greedy
two-pointer-algorithm
Picked
DSA
CSES Solutions - Reading Books
Last Updated: 28 March 2024
There are N books, and Kotivalo and Justiina are going to read them all. For each book, you know the time it takes to read it, given as arr[] such that arr[i] is the time ...
read more
Greedy
Competitive Programming
Picked
DSA
CSES Problems
CSES Solutions - Tasks and Deadlines
Last Updated: 01 April 2024
You have to process N tasks. Each task has a duration and a deadline given as 2D array tasks[][] such that for task i, tasks[i][0] is the duration, and tasks[i][1] is the ...
read more
Greedy
Competitive Programming
Picked
DSA
CSES Problems
CSES Solutions - Movie Festivals
Last Updated: 10 December 2024
In a movie festival, N movies will be shown. You know the starting and ending time of each movie given as movies[][] such that movies[i][0] = starting time of ith movie an...
read more
Greedy
Sorting
Competitive Programming
Picked
DSA
CSES Problems
CSES Solutions - Apartments
Last Updated: 01 April 2024
There are N applicants and M free apartments. Your task is to distribute the apartments so that as many applicants as possible will get an apartment. Each applicant has a ...
read more
Greedy
Sorting
Competitive Programming
Picked
DSA
CSES Problems
CSES Solutions - Ferris Wheel
Last Updated: 01 April 2024
There are N children who want to go to a Ferris wheel in the form of array arr[], and your task is to find a gondola for each child. Each gondola may have one or two child...
read more
Greedy
Competitive Programming
Picked
DSA
CSES Problems
CSES Solutions - Two Sets
Last Updated: 04 April 2024
Given N numbers 1,2,3,... N. Your task is to divide the numbers into two sets of equal sum. Print "YES", if the division is possible, and "NO" otherwise. If the division i...
read more
Greedy
Competitive Programming
Picked
DSA
CSES Problems
Is Dijkstra a greedy algorithm?
Last Updated: 13 February 2024
In the world of computer science and algorithms, there's a lot of talk about Dijkstra's algorithm and its classification as a "greedy" algorithm. In this article, we will ...
read more
Dijkstra
Graph
Algorithms
Greedy
Greedy Algorithms
DSA
Data Structures and Algorithms-QnA
Greedy Algorithms
Last Updated: 07 April 2025
Greedy algorithms are a class of algorithms that make locally optimal choices at each step with the hope of finding a global optimum solution. At every step of the algorit...
read more
Greedy
Algorithms-Greedy Algorithms
DSA
1
2
3
4
...
140
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !