Given two arrays with size n, maximize the first array by using the elements from the second array such that the new array formed contains n greatest but unique elements of both the arrays giving the second array priority (All elements of second array appear before first array). The order of appearance of elements is kept same in output as in input.Examples:...
Given two arrays with size n, maximize the first array by using the elements from the second array such that the new array formed contains n greatest but unique elements of both the arrays giving the second array priority (All elements of second array appear before first array). The order of appearance of elements is kept same in output as in input.Examples:...
Given two arrays with size n, maximize the first array by using the elements from the second array such that the new array formed contains n greatest but unique elements of both the arrays giving the second array priority (All elements of second array appear before first array). The order of appearance of elements is kept same in output as in input.Examples:...
Given two numeric Hexadecimal numbers str1 and str2, the task is to add the two hexadecimal numbers....
Given an unsorted array that may contain duplicates. Also given a number k which is smaller than the size of the array. Write a function that returns true if the array contains duplicates within k distance.Examples:...
Given an array arr[] of size N and an integer K, the task is to find the length of the longest subarray having Bitwise XOR of all its elements equal to K....
Given two strings, str1 and str2, the task is to find and print the uncommon characters of the two given strings in sorted order without using extra space. Here, an uncommon character means that either the character is present in one string or it is present in the other string but not in both. The strings contain only lowercase characters and can contain duplicates....
In this sorting algorithm, Hash Function f is used with the property of Order Preserving Function which states that if ....
Given an array arr[] of size N, the task is to find the maximum and minimum sum of Bitwise XOR of all pairs from an array by splitting the array into N / 2 pairs....
Given a NxM matrix of integers containing duplicate elements. The task is to find the sum of all minimum occurring elements in the given matrix. That is the sum of all such elements whose frequency is even in the matrix....
Given a string str and an array cost[] of size N where cost[i] denotes the cost to remove the ith character from the string str, the task is to find the minimum cost of removals required to make every character of the string unique....
Given an array arr[] of size N, the task is for each array element is to find the nearest non-equal value present on its left in the array. If no such element is found, then print -1...