Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Competitive Programming
2.3k+ articles
Algorithms
1.9k+ articles
Sorting
1.7k+ articles
Searching
1.7k+ articles
frequency-counting
730+ articles
array-rearrange
460+ articles
DSA
>
Algorithms
>
Greedy
Greedy
2k+ posts
Popular Articles
Recent Articles
Why does Dijkstra's Algorithm fail on negative weights?
Last Updated: 23 July 2024
Dijkstra's Algorithm: It is a graph searching algorithm that uses a Greedy Approach to find the shortest path from the source node to all ot
...read more
Dijkstra
Graph
Analysis of Algorithms
Greedy
Shortest Path
Algorithms-Graph Shortest Paths Quiz
DSA
Find all missing numbers from a given sorted array
Last Updated: 08 February 2022
Given a sorted array arr[] of N integers, The task is to find the multiple missing elements in the array between the ranges [arr[0], arr[N-1
...read more
Arrays
Greedy
Mathematical
Hash
HashTable
frequency-counting
DSA
Minimum time taken by each job to be completed given by a Directed Acyclic Graph
Last Updated: 19 April 2024
Given a Directed Acyclic Graph having V vertices and E edges, where each edge {U, V} represents the Jobs U and V such that Job V can only be
...read more
Graph
Algorithms
Greedy
BFS
Topological Sorting
Data Structures-Graph
Algorithms-Graph Traversals
Graph Traversals
DSA
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Competitive Programming
2.3k+ articles
Algorithms
1.9k+ articles
Sorting
1.7k+ articles
Searching
1.7k+ articles
frequency-counting
730+ articles
array-rearrange
460+ articles
Travelling Salesman Problem | Greedy Approach
Last Updated: 16 January 2023
Given a 2D matrix tsp[][], where each row has the array of distances from that indexed city to all the other cities and -1 denotes that ther
...read more
Algorithms
Greedy
Competitive Programming
Computer Subject
Algorithms-Greedy Algorithms
Java Programs
DSA
Shortest Job First (or SJF) CPU Scheduling Non-preemptive algorithm using Segment Tree
Last Updated: 17 January 2024
Shortest job first (SJF) or shortest job next, is a scheduling policy that selects the waiting process with the smallest execution time to e
...read more
Tree
Greedy
Mathematical
cpu-scheduling
Operating Systems
C++
Operating Systems-CPU Scheduling
DSA
Minimum product subset of an array
Last Updated: 16 February 2023
INTRODUCTION:The minimum product subset of an array refers to a subset of elements from the array such that the product of the elements in t
...read more
Arrays
Greedy
Sorting
Technical Scripter
DSA
Maximum product subset of an array
Last Updated: 22 August 2022
Given an array a, we have to find the maximum product possible with the subset of elements present in the array. The maximum product can be
...read more
Arrays
Greedy
Technical Scripter
DSA
Program for Next Fit algorithm in Memory Management
Last Updated: 05 May 2023
Prerequisite: Partition allocation methodsWhat is Next Fit?The next fit is a modified version of 'first fit'. It begins as the first fit to
...read more
Greedy
Operating Systems
DSA
Min Adjacent Swaps for Bracket Balancing
Last Updated: 02 November 2024
You are given a string of 2N characters consisting of N '[' brackets and N ']' brackets. A string is considered balanced if it can be repres
...read more
Strings
Greedy
DSA
Minimum sum of absolute difference of pairs of two arrays
Last Updated: 08 July 2022
Given two arrays a[] and b[] of equal length n. The task is to pair each element of array a to an element in array b, such that sum S of abs
...read more
Greedy
DSA
Maximum equal sum of three stacks
Last Updated: 24 April 2025
The three stacks s1, s2 and s3, each containing positive integers, are given. The task is to find the maximum possible equal sum that can be
...read more
Stack
Greedy
DSA
Dial's Algorithm (Optimized Dijkstra for small range weights)
Last Updated: 23 June 2023
Dijkstra’s shortest path algorithm runs in O(Elog V) time when implemented with adjacency list representation (See C implementation and ST
...read more
Dijkstra
Graph
Greedy
Shortest Path
DSA
Shortest Superstring Problem
Last Updated: 16 March 2024
Given a set of n strings arr[], find the smallest string that contains each string in the given set as substring. We may assume that no stri
...read more
Strings
NPHard
Greedy
DSA
Lowest Number by Removing k digits
Last Updated: 27 March 2025
Given a string s consisting of digits and an integer k, remove k digits from the string to form the smallest possible number, maintaining th
...read more
Strings
Amazon
FactSet
Stack
Greedy
Mathematical
number-digits
deque
DSA
Greedy Algorithm for Egyptian Fraction
Last Updated: 07 April 2023
Every positive fraction can be represented as sum of unique unit fractions. A fraction is unit fraction if numerator is 1 and denominator is
...read more
Greedy
Mathematical
Fraction
DSA
First
1
2
3
4
5
6
7
8
>>
Last
First
1
2
3
4
5
6
>>
Last
First
3
4
5
6
>>
Last
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 !