Skip to content

Tag Archives: cpp-unordered_map

Given an array of N numbers. Find out the number of pairs i and j such that i < j and Ai and Aj have… Read More
Given a binary tree, find the vertical width of the binary tree. Width of a binary tree is the number of vertical paths. Examples:  Input… Read More
Given two strings A and B. Minimize the number of unique characters in string A by either swapping A[i] with B[i] or keeping it unchanged.… Read More
Given a linked list. We need to find unique elements in the linked list i.e, those elements which are not repeated in the linked list… Read More
Given N(very large), the task is to print the largest palindromic number obtained by permuting the digits of N. If it is not possible to… Read More
Given an array of N numbers, the task is to answer Q queries of the following type: query(start, end) = Number of times a number… Read More
Given a set S (all distinct elements) of integers, find the largest d such that a + b + c = d where a, b, c,… Read More
Given an unsorted array of integers, find the number of subarrays having a sum exactly equal to a given number k. Examples:  Input : arr[]… Read More
Given an array of size N with repeated numbers, You Have to Find the top three repeated numbers.  Note : If Number comes same number… Read More
Given an array arr[] of n positive integers. The task is to find the size of the subset formed from the elements of the given… Read More
Find the first non-repeating element in a given array of integers. Examples: Input : -1 2 -1 3 2 Output : 3 Explanation : The… Read More
Given a string, convert the string to palindrome without any modifications like adding a character, removing a character, replacing a character etc.  Examples:  Input :… Read More
Given an array of n integers, find the sum of f(a[i], a[j]) of all pairs (i, j) such that (1 <= i < j <=… Read More
Given an interval [x, y]. Find the divisor that occurs maximum number of times except ‘1’ in the divisors of numbers in the range [x,… Read More
Given a n x n matrix of integers. The problem is to find the largest area rectangular sub-matrix having sum divisible by the given value… Read More

Start Your Coding Journey Now!