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
DSA
22.5K+ articles
Mathematical
7.8K+ articles
Arrays
6.4K+ articles
Competitive Programming
2.3K+ articles
Greedy
2.1K+ articles
Algorithms
2.0K+ articles
Sorting
1.8K+ articles
Data Structures
1.2K+ articles
DSA Quiz
328+ articles
Greedy Algorithms
111+ articles
Algorithms-Greedy Algorithms
33 posts
Recent Articles
Popular Articles
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
Maximum adjacent pair sum by array rearrangement
Last Updated: 11 April 2024
Given an array arr[] of size N, find the maximum value of adjacent sum by rearranging array in any order.Examples:Input: arr[] = {1, 2, 3, 4}Output: 17Explanation: The arr...
read more
Arrays
Algorithms-Greedy Algorithms
DSA
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
Counting Distinct Arrays by Removal and Concatenation of Elements
Last Updated: 29 February 2024
Given an array arr[] of length N, the task is to create an array res[] of length N where each element res[i] represents the count of distinct arrays obtained by applying ...
read more
Arrays
Competitive Programming
Data Structures-Stack
Algorithms-Greedy Algorithms
Geeks Premier League
DSA
Geeks Premier League 2023
Find number of Strictly Increasing Sequences with 'a' and 'b' in a String
Last Updated: 06 February 2024
Given a string S of length N (1 = N = 105) consisting of lower case alphabets. The task is to find the number of strictly increasing sequences P1,P2, …, Pk such that:For e...
read more
Strings
Competitive Programming
Algorithms-Greedy Algorithms
Picked
Geeks Premier League
DSA
Geeks Premier League 2023
Restore the original array from another array generated by given operations
Last Updated: 05 February 2024
Given an array b. The array b is obtained initially by array a, by doing the following operations.Choose a fixed point x from array a.Cyclically rotate the array a to the ...
read more
Arrays
Arrays
Algorithms-Greedy Algorithms
QA - Placement Quizzes-Data Interpretation
python-dict
Scala-Arrays
Volkswagen IT Services
Geeks Premier League
DSA
Geeks Premier League 2023
Find the minimum number containing only 0s and 1s that represents N.
Last Updated: 24 February 2024
Given an integer N, the task is to represent N as the sum of numbers such that the numbers can only be formed using the digits 0 and 1 and the total numbers used should be...
read more
Competitive Programming
Algorithms-Dynamic Programming
Algorithms-Greedy Algorithms
Picked
Geeks Premier League
Geeks Premier League 2023
Find Maximum Difference Between any Two Pairs By Following Operations Optimally
Last Updated: 31 December 2023
Given an array X[] of length N along with A and B. You can apply below type of operations:Operation 1: Choose two different indices, delete elements at both indices and in...
read more
Arrays
Java
Greedy
Sorting
Algorithms-Greedy Algorithms
Greedy Algorithms
Java-Arrays
array-range-queries
Geeks Premier League
DSA
DSA-Blogs
Geeks Premier League 2023
Maximum area that can be saved in the given Matrix
Last Updated: 09 December 2023
Consider a matrix of N rows and M columns. Initially, there is a cell at co-ordinate (X, Y), which is blue. Then the task is to place the Yellow color in an optimal cell s...
read more
Matrix
Algorithms-Greedy Algorithms
Greedy Algorithms
Geeks Premier League
DSA
Geeks Premier League 2023
Bit Toggling to Minimize Array Sum
Last Updated: 04 December 2023
Given an array arr[] consisting of positive integers of size N. the task is to minimize the overall sum of arr[] by toggling the unset bit (0 bit) of any element of the ar...
read more
Bit Magic
Algorithms-Greedy Algorithms
Geeks Premier League
DSA
Geeks Premier League 2023
Find winner in the game of Binary Array
Last Updated: 28 August 2023
Given a binary array X[] of size N. Two players A and B are playing games having the following rules, then the task is to determine the winner if B starts first and both p...
read more
Arrays
Greedy
Competitive Programming
Algorithms-Greedy Algorithms
Greedy Algorithms
Java-Competitive-Programming
DSA
Minimum cost to make every Kth element in Array equal
Last Updated: 24 April 2023
Given an array arr[] of integers and an integer K, the task is to find the minimum number of operations required to make every Kth element in the array equal. While perfor...
read more
Arrays
Dynamic Programming
Greedy
cpp-vector
Algorithms-Greedy Algorithms
DSA
Analytical Mathematical Puzzles
Greedy Algorithm Tutorial
Last Updated: 13 December 2024
Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. Greedy algor...
read more
GBlog
Greedy
Algorithms-Greedy Algorithms
Greedy Algorithms
DSA
Tutorials
DSA Tutorials
GBlog 2024
Minimum increment/decrement operations required on Array to satisfy given conditions
Last Updated: 23 April 2021
Given an array arr[] of size N, the task is to find the minimum number of increment or decrement operations required at any index i such that for each i (1 ? i N) if the ...
read more
Arrays
Greedy
Mathematical
Algorithms-Greedy Algorithms
Greedy Algorithms
DSA
Maximum modified Array sum possible by choosing elements as per the given conditions
Last Updated: 30 June 2022
Given an array arr[] of size N, the task is to find the maximum possible sum of the array elements such that the element can be chosen as per the below conditions:For each...
read more
Arrays
Greedy
Sorting
Mathematical
Algorithms-Greedy Algorithms
Greedy Algorithms
DSA
1
2
3
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 !