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
Convert string to integer without using any in-built functions
Last Updated: 13 December 2023
Given a string str, the task is to convert the given string into the number without using any inbuilt function.Examples:Input: str = "985632
...read more
Arrays
Strings
Greedy
Mathematical
number-digits
C++
Numbers
C Programs
C++ Programs
Write From Home
DSA
Shortest path in a directed graph by Dijkstra’s algorithm
Last Updated: 27 December 2023
Given a directed graph and a source vertex in the graph, the task is to find the shortest distance and path from source to target vertex in
...read more
Tree
Dijkstra
Graph
Algorithms
Greedy
Sorting
Competitive Programming
C++
Data Structures
Algorithms-Graph Shortest Paths Quiz
C++ Programs
DSA
Optimal File Merge Patterns
Last Updated: 24 February 2023
Given n number of sorted files, the task is to find the minimum computations done to reach the Optimal Merge Pattern.When two or more sorted
...read more
Greedy
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
Python Program to check if given array is Monotonic
Last Updated: 22 April 2024
Given an array A containing n integers. The task is to check whether the array is Monotonic or not. An array is monotonic if it is either mo
...read more
Arrays
Greedy
Python Programs
DSA
Kruskal's Algorithm (Simple Implementation for Adjacency Matrix)
Last Updated: 20 March 2023
Below are the steps for finding MST using Kruskal's algorithmSort all the edges in non-decreasing order of their weight.Pick the smallest ed
...read more
Algorithms
Greedy
C Programs
DSA
Water Connection Problem
Last Updated: 26 March 2025
You are given n houses in a colony, numbered from 1 to n, and p pipes connecting these houses. Each house has at most one outgoing pipe and
...read more
Graph
Greedy
Competitive Programming
DFS
DSA
Policemen catch thieves
Last Updated: 27 March 2025
Given an array arr, where each element represents either a policeman (P) or a thief (T). The objective is to determine the maximum number of
...read more
National Instruments
Greedy
two-pointer-algorithm
DSA
Top 20 Greedy Algorithms Interview Questions
Last Updated: 29 March 2025
Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and
...read more
Interview Experiences
Algorithms
Greedy
Interview-Questions
DSA
Experiences
Interview Questions
Job Sequencing Problem using Disjoint Set
Last Updated: 27 March 2025
Given three arrays id[], deadline[], profit[], where each job i is associated with id[i], deadline[i], and profit[i]. Each job takes 1 unit
...read more
Accolite
Greedy
union-find
DSA
Smallest number with given digit count and sum
Last Updated: 24 March 2025
Given two integers s and d, find the smallest possible number that has exactly d digits and a sum of digits equal to s.Return the number as
...read more
Greedy
DSA
Find minimum time to finish all jobs with given constraints
Last Updated: 07 March 2025
Given an array job[], where each element represents the time required to complete a specific job. There are k identical assignees available
...read more
Binary Search
Greedy
DSA
Boruvka's algorithm | Greedy Algo-9
Last Updated: 17 March 2023
We have discussed the following topics on Minimum Spanning Tree.Applications of Minimum Spanning Tree ProblemKruskal’s Minimum Spanning Tr
...read more
Graph
Greedy
MST
DSA
Greedy Approximate Algorithm for Set Cover Problem
Last Updated: 14 June 2023
Given a universe U of n elements, a collection of subsets of U say S = {S1, S2...,Sm} where every subset Si has an associated cost. Find a m
...read more
NPHard
Greedy
DSA
Greedy Approximate Algorithm for K Centers Problem
Last Updated: 14 March 2024
Given n cities and distances between every pair of cities, select k cities to place warehouses (or ATMs or Cloud Server) such that the maxim
...read more
Graph
Greedy
DSA
Maximum Length Chain of Pairs | DP-20
Last Updated: 12 April 2023
You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. A pair (c, d) can follow another
...read more
Amazon
Dynamic Programming
Greedy
DSA
First
1
2
3
4
5
6
7
8
>>
Last
First
1
2
3
4
5
6
>>
Last
First
2
3
4
5
>>
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 !