## Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array

Given two arrays A and B of N integers. Reorder the elements of B in itself in such a way that the sequence formed by… Read More »

- k-th missing element in an unsorted array
- Number of unique pairs in an array
- Choose atleast two elements from array such that their GCD is 1 and cost is minimum
- Count of words that are present in all the given sentences
- Minimum length substring with exactly K distinct characters
- Find the longest string that can be made up of other strings from the array
- Count occurrences of a string that can be constructed from another given string
- Sum of nodes in bottom view of Binary Tree
- Split the array elements into strictly increasing and decreasing sequence
- Rearrange characters in a string such that no two adjacent are same using hashing
- Sum of nodes in top view of binary tree
- Maximum length of the sub-array whose first and last elements are same
- Count duplicates in a given linked list
- Remove all occurrences of any element for maximum array sum
- Find uncommon characters of the two strings | Set 2
- Count of unique pairs (arr[i], arr[j]) such that i < j
- Minimum number of given operations required to convert a permutation into an identity permutation
- Number of subarrays such that XOR of one half is equal to the other
- Print the first shortest root to leaf path in a Binary Tree
- Design a stack which can give maximum frequency element
- Count of pairs of strings which differ in exactly one position
- Two equal sum segment range queries
- Flip minimum signs of array elements to get minimum sum of positive elements possible
- Count all elements in the array which appears at least K times after their first occurrence
- Minimum changes required to make a Catalan Sequence
- Count equal pairs from given string arrays
- Find d to maximize the number of zeros in array c[] created as c[i] = d*a[i] + b[i]
- Maximum product from array such that frequency sum of all repeating elements in product is less than or equal to 2 * k
- Longest sub-sequence of array containing Lucas numbers
- Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array

Given two arrays A and B of N integers. Reorder the elements of B in itself in such a way that the sequence formed by… Read More »

Given four arrays containing integer elements and an integer sum, the task is to count the quadruplets such that each element is chosen from a… Read More »

Given an array of positive integers, remove all the occurrences of element to get the maximum sum of the remaining array Examples: Input : arr… Read More »

Given a string str of lowercase English alphabets and an integer m. The task is to count how many positions are there in the string… Read More »

Given two unsorted arrays arr1[] and arr2[], the task is to find the sum of elements of arr1[] such that number of elements less than… Read More »

Given two arrays x[] and y[] where x[i] represents the x coordinate and y[i] represents the corresponding y coordinate of a 2-D point, the task… Read More »

Given an array of N elements. The task is to split the elements into two arrays say a1[] and a2[] such that one contains strictly… Read More »

Given three arrays a[], b[] and c[] of N elements representing the three sides of N triangles. The task is to find the number of… Read More »

Given a permutation P (P1, P2, P3, … Pn) of first n natural numbers. Find the minimum number of operations to convert it into an… Read More »

Given a person who is at position current_pos and a binary string path which is the moves the person took, if path[i] = ‘0’ then… Read More »

Given an array arr[] of strings of equal lengths. The task is to calculate the total number of pairs of strings which differ in exactly… Read More »

Given an array arr[] containing only prime numbers, the task is to check if the product of the array elements is a perfect square or… Read More »

Given a string S and a range [L, R]. The task is to find the number of ways in which the sub-string in the range… Read More »

Given an array arr[] of N elements (0 ≤ arr[i] ≤ 1000). The task is to find the maximum length of the sub-array that contains… Read More »

Given a binary tree, the task is to print the sum of nodes in bottom view of the given Binary Tree. Bottom view of a… Read More »