Rearrange array to obtain maximum possible value of concatenation of prefix GCDs
Given an array arr[] consisting of N positive integers, the task is to rearrange the array elements such that the number formed by concatenating the… Read More »
Given an array arr[] consisting of N positive integers, the task is to rearrange the array elements such that the number formed by concatenating the… Read More »
Given an array arr[] of distinct integers of size N, the task is to print the count of greater elements on the left side of… Read More »
Given an array arr[] consisting of N distinct integers and a positive integer K, the task is to find the minimum element that occurs in… Read More »
Given an array arr[] of size N, the task is to print the least possible size the given array can be reduced to by performing… Read More »
Given an array arr[] consisting of N integers, the task is to find the maximum Bitwise XOR from all the possible pairs in the given… Read More »
Given an array arr[], the task is to print the array obtained by inserting elements of arr[] one by one into an initially empty array,… Read More »
Given an array arr[] consisting of N strings and an array Query[] consisting of Q queries. Each string in arrays arr[] and Query[] is of… Read More »
Given an array, arr[] of size N, the task is to print the start and end indices of all subarrays whose sum is a perfect… Read More »
Given an array arr[] consisting of N positive integers and an integer K, which represents the maximum number that can be added to the array… Read More »
Given a 2D array arr[][] consisting of N pairs of integers, the task is to find the pair which covers all other pairs of the… Read More »
Given an array arr[] consisting of N positive integers, the task is to find a subarray of length K such that concatenation of each element… Read More »
Given two arrays X[] and Y[] consisting of N and M integers such that there are N lines parallel to the y-axis and M lines… Read More »
Given a Stack S, the task is to print the elements of the stack from top to bottom such that the elements are still present… Read More »
Given string str, the task is to rearrange the given string to obtain the longest palindromic substring. Examples: Input: str = “geeksforgeeks”Output: eegksfskgeeorExplanation: eegksfskgee is… Read More »
Given an array, arr[] of size N, the task is to rearrange the array elements to maximize the count of triplets (i, j, k) that… Read More »