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
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 solutio
...read more
Greedy
Algorithms-Greedy Algorithms
DSA
Shortest Remaining Time First (Preemptive SJF) Scheduling Algorithm
Last Updated: 03 February 2025
In this post, we will talk about the pre-emptive version of Shortest Job First (SJF) scheduling, called Shortest Remaining Time First (SRTF)
...read more
Algorithms
Greedy
cpu-scheduling
Operating Systems
DSA
Program for Shortest Job First (or SJF) CPU Scheduling | Set 1 (Non- preemptive)
Last Updated: 24 March 2023
The shortest job first (SJF) or shortest job next, is a scheduling policy that selects the waiting process with the smallest execution time
...read more
Greedy
cpu-scheduling
Operating Systems
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
Fractional Knapsack Problem
Last Updated: 20 April 2025
Given two arrays,val[]andwt[], representing the values and weights of items, and an integercapacityrepresenting the maximum weight a knapsac
...read more
Greedy
knapsack
Fraction
DSA
Job Sequencing Problem
Last Updated: 28 March 2025
Given two arrays: deadline[] and profit[], where the index of deadline[] represents a job ID, and deadline[i] denotes the deadline for that
...read more
Accolite
Greedy
Sorting
Heap
DSA
Minimum Platforms Required for Given Arrival and Departure Times
Last Updated: 26 March 2025
Given two arrays, arr[] and dep[], that represent the arrival and departure times of trains respectively, the task is to find the minimum nu
...read more
Amazon
Paytm
Accolite
Hike
Greedy
two-pointer-algorithm
Airtel
DSA
Dijkstra’s Algorithm for Adjacency List Representation | Greedy Algo-8
Last Updated: 29 March 2025
The Dijkstra's Algorithm, we can either use the matrix representation or the adjacency list representation to represent the graph, while the
...read more
Dijkstra
Graph
Greedy
Shortest Path
DSA
How to find Shortest Paths from Source to all Vertices using Dijkstra's Algorithm
Last Updated: 11 April 2025
Given a weighted undirected graph represented as an edge list and a source vertex src, find the shortest path distances from the source vert
...read more
Amazon
Adobe
Morgan Stanley
Dijkstra
Samsung
Cisco
Graph
Accolite
Vizury Interactive Solutions
Greedy
Shortest Path
DSA
Prim’s Algorithm for Minimum Spanning Tree (MST)
Last Updated: 26 February 2025
Prim’s algorithm is aGreedy algorithm like Kruskal's algorithm. This algorithm always starts with a single node and moves through several
...read more
Amazon
Minimum Spanning Tree
Samsung
Cisco
Graph
Greedy
Prim's Algorithm.MST
DSA
Huffman Coding | Greedy Algo-3
Last Updated: 22 April 2025
Huffman coding is a lossless data compression algorithm. The idea is to assign variable-length codes to input characters, lengths of the ass
...read more
Amazon
Huffman Coding
Morgan Stanley
Samsung
United Health Group
Greedy
Heap
encoding-decoding
priority-queue
DSA
Kruskal’s Minimum Spanning Tree (MST) Algorithm
Last Updated: 05 March 2025
A minimum spanning tree (MST) or minimum weight spanning tree for a weighted, connected, and undirected graph is a spanning tree (no cycles
...read more
Kruskal
Kruskal'sAlgorithm
Graph
Greedy
MST
DSA
Activity Selection Problem | Greedy Algo-1
Last Updated: 27 March 2025
Given n activities with their start and finish times given in arraystart[]andfinish[]. Select the maximum number of activities that can be p
...read more
Amazon
Activity Selection Problem
Morgan Stanley
Flipkart
Facebook
MakeMyTrip
Visa
Greedy
DSA
Coin Change - Count Ways to Make Sum
Last Updated: 12 March 2025
Given an integerarray of coins[] of size nrepresenting different types of denominations and an integer sum, the task is to count all combina
...read more
Microsoft
Morgan Stanley
Samsung
Snapdeal
Paytm
Accolite
Dynamic Programming
Greedy
Mathematical
DSA
Rotate an Array by d - Counterclockwise or Left
Last Updated: 03 October 2024
Given an array of integers arr[] of size n, the task is to rotate the array elements to the left by d positions.Examples:Input:arr[] = {1, 2
...read more
Arrays
Amazon
MAQ Software
SAP Labs
MakeMyTrip
Greedy
rotation
Wipro
DSA
Permutations of given String
Last Updated: 10 April 2025
Given a string s, the task is to return all permutations of a given string in lexicographically sorted order.Note: A permutation is the rear
...read more
Strings
Amazon
Samsung
Walmart
Cisco
Citrix
Snapdeal
Accolite
MAQ Software
Greedy
Backtracking
Mathematical
Combinatorial
OYO
permutation
Recursion
Apple
strings
DSA
1
2
3
4
5
6
7
8
>>
Last
1
2
3
4
5
6
>>
Last
1
2
3
4
>>
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 !