Given two arrays W[] and L[] consisting of N positive integers, where W[i] is initially located at position i on an infinite number line. In… Read More

# Tag Archives: cpp-unordered_map

Given a Binary Tree consisting of N nodes having values in the range [0, N – 1] rooted as 0, an array wt[] of size… Read More

Given an array arr[] consisting of N positive integers, the task is to find an index from the array having count of prime numbers present… Read More

Given a string S consisting of N characters (representing the tasks to perform) and a positive integer K, the task is to find the minimum… Read More

Given string S consists of lowercase and uppercase letters, the task is to find the number of substrings having an equal number of lowercase and… Read More

Given an array arr[] consisting of N positive integers, the task is to find the permutation of first N natural numbers such that the given… Read More

Given an array arr[] of size N, the task is to count the number of pairs (i, j) possible from the array such that arr[j]… Read More

Given a positive integer N, the task is to print the nearest power of 2 of the frequencies of each digit present in N. If… Read More

Given string S of size N consisting of K distinct characters and (N – K) ‘?’s, the task is to replace all ‘?’ with existing… Read More

Given an array arr[] of size N, the task is to check if any two integers A and B coincide at a single point on… Read More

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… Read More

Given an array arr[] consisting of N positive integers, the task is to find the count of unique pairs (i, j) such that the sum… Read More

Given an array arr[] of size N, the task is to count the number of unique quadruples (a, b, c, d) from the array such… Read More

Given an array A[] consisting of N integers, the task is to count the number of pairs (i, j) such that i < j, and… Read More