# Category Archives: Greedy

Given an integer N, the task is to find the minimum number of operations required to make N even such that in one operation prefixâ€¦ Read More
Given a square matrix mat[][] of dimension N and an integer K, the task is to rotate the matrix by 90 degrees K times withoutâ€¦ Read More
Given a square matrix mat[][] of dimension N and an integer K, the task is to rotate the matrix by 90 degrees K times withoutâ€¦ Read More
Given two arrays arr[] and brr[] containing integers. The task is to find the Kth largest product of a pair (arr[i], brr[j]). Examples:  Input: arr[]â€¦ Read More
Given an array Arr[] of size N consisting of N pairwise distinct positive integers. The task is to find N – 1 different pair ofâ€¦ Read More
Given two integers N and K. Perform the following type of operations on N: if the last digit of N is non-zero, decrease the numberâ€¦ Read More
Given an array arr[] of length N and an integer K. The task is to find the minimum length of subarray such that at leastâ€¦ Read More
Given an array a, we have to find the minimum product possible with the subset of elements present in the array. The minimum product canâ€¦ Read More
Given an array a, we have to find the minimum product possible with the subset of elements present in the array. The minimum product canâ€¦ Read More
Given an array a, we have to find the minimum product possible with the subset of elements present in the array. The minimum product canâ€¦ Read More
Given an array a, we have to find the minimum product possible with the subset of elements present in the array. The minimum product canâ€¦ Read More
Given an array a, we have to find the minimum product possible with the subset of elements present in the array. The minimum product canâ€¦ Read More
Given an M*N grid, and given an array startPos[], indicating that the starting position is the cell (startPos[0], startPos[1]) and the array homePos[] indicating itsâ€¦ Read More
Given an array arr[] of N integers, the task is to find the minimum value of K such that the sum of elements on indicesâ€¦ Read More
Given a string S of size N and a linked list, the task is to check if the linked list contains a string as aâ€¦ Read More