# Category Archives: Greedy

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… Read More
Given two integers N and K, the task is to find the Nth Subset from the sequence of subsets generated from the powers of K… Read More
Given an array arr[] consisting of N integers, the task is to find the largest subarray consisting of unique elements only. Examples: Input: arr[] =… Read More
Given a circular array arr[] of size N, the task is to check if it is possible to make all array elements of the circular… Read More
Prerequisite: Trie | (Insert and Search) Given an array of strings words[] and a partial string str, the task is to find the strings of… Read More
Given a positive number N, the task is to check whether the given number N can be expressed in the form of ax + by… Read More
Given a range [low, high], both inclusive, and an integer K, the task is to select K numbers from the range(a number can be chosen… Read More
Given a strictly decreasing array arr[] consisting of N integers, the task is to find the minimum number of operations required to make at least… Read More
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… Read More
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and… Read More
Given a numeric string str, the task is to calculate the number of substrings with the sum of digits equal to their length. Examples: Input:… Read More
Given an array arr[] and a number K, the task to find the maximum distance between two elements whose absolute difference is K. If it… Read More
Given string str, a character ch, and an integer K, the task is to find the minimum number of operations required to convert all the… Read More
Given four integers N, M, A, B where N is the number of rows and M is the number of columns, the task is to… Read More
Given an array arr[], the task is to check if it is possible to rearrange the array in such a way that every even index(1-based… Read More