## Minimum steps required to reduce all the elements of the array to zero

Given an array arr[] of positive integers, the task is to find the minimum steps to reduce all the elements to 0. In a single… Read More »

- Sort an array without changing position of negative numbers
- Count the triplets such that A[i] < B[j] < C[k]
- Find the longest string that can be made up of other strings from the array
- Two nodes of a BST are swapped, correct the BST | Set-2
- Find maximum meetings in one room
- Greatest contiguous sub-array of size K
- Merge two BSTs with constant extra space
- Pair with largest sum which is less than K in the array
- Maximum water that can be stored between two buildings
- Find a triplet in an array whose sum is closest to a given number
- Count pairs with given sum | Set 2
- Find minimum changes required in an array for it to contain k distinct elements
- Maximum Length Chain of Pairs | Set-2
- Unbounded Fractional Knapsack
- Sort an array of strings based on the frequency of good words in them
- Product of all Subsequences of size K except the minimum and maximum Elements
- Rearrange the characters of the string such that no two adjacent characters are consecutive English alphabets
- Program to print an array in Pendulum Arrangement with constant space
- Sort an array of strings according to string lengths using Map
- Remove elements to make array sorted
- Sort the Queue using Recursion
- Check whether an array can be made strictly decreasing by modifying at most one element
- Create a Sorted Array Using Binary Search
- Find the winner of the match | Multiple Queries
- Smallest element greater than X not present in the array
- Alternate XOR operations on sorted array
- Sort an array according to absolute difference with given value using Functors
- Print elements of an array according to the order defined by another array | set 2
- Find the minimum number of rectangles left after inserting one into another
- Case-specific Sorting of Strings

Given an array arr[] of positive integers, the task is to find the minimum steps to reduce all the elements to 0. In a single… Read More »

Quickselect is a selection algorithm to find the k-th smallest element in an unordered list. It is related to the quick sort sorting algorithm. Examples:… Read More »

Given two arrays A[] and B[] and two integers X and Y, the task is to choose X elements from A[] and Y elements from… Read More »

Given an array arr[] of N integers representing the lengths of the gloves, the task is to count the maximum possible pairs of gloves from… Read More »

Given an array arr[] of N elements and the task is to count the number of elements from this array which are not at the… Read More »

Given a string str of alphanumeric characters, the task is to sort the similar group of consecutive characters separately and print the modified string i.e.… Read More »

Given two sorted arrays, we need to merge them with O(1) extra space into a sorted array, when N is the size of the first… Read More »

Given an array arr[] of integers and an integer K. The task is to sort the elements of the given array in the increasing order… Read More »

Given N strings containing of characters ‘a’ and ‘b’. These string can be concatenated in any order to make a single final string S. The… Read More »

Given an array arr[] of N elements and an integer K, the task is to make any K elements of the array equal by performing… Read More »

Counting Sort is one of the best sorting algorithms which can sort in O(n) time complexity but the disadvantage with the counting sort is it’s… Read More »

Pre-requisite: Selection Sort The human brain can easily process visuals in spite of long codes to understand the algorithms. In this article, Selection Sort visualization… Read More »

Given an array arr[] of strings. The task is to sort the array in lexicographical order using Heap Sort. Examples: Input: arr[] = { “banana”,… Read More »

Given the length of an array of integers N and an integer K. The task is to modify the array in such a way that… Read More »

Given an array arr[] of N integers, the task is to swap the first and the last element then the third and the third last… Read More »