Skip to content
geeksforgeeks
  • 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
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Competitive Programming
2.3k+ articles
Algorithms
2k+ articles
Sorting
1.7k+ articles
Searching
1.7k+ articles
frequency-counting
730+ articles
array-rearrange
460+ articles
  1. DSA
  2. >
  3. Algorithms
  4. >
  5. Greedy

Greedy

2k+ posts
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
image
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
image
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
2k+ 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
image
Dijkstra
Graph
Greedy
Shortest Path
DSA
Dijkstra's Algorithm to find Shortest Paths from a Source to all
Last Updated: 27 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
image
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
image
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
image
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
image
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
image
Amazon
Activity Selection Problem
Morgan Stanley
Flipkart
Facebook
MakeMyTrip
Visa
Greedy
DSA
Coin Change - Count Ways to Make Sum
Last Updated: 27 April 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
image
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
image
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
image
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
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
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
Lightbox