Unordered_map is an associated container that stores elements formed by the combination of key-value and a mapped value. The key value is used to uniquely… Read More
Tag Archives: cpp-unordered_map
Given two strings S1 and S2. The task is to concatenate uncommon characters of the S2 to S1 and return the resultant string S1 . Examples: … Read More
Given an array of size n, the goal is to find out the smallest number that is repeated exactly ‘k’ times where k > 0? And Examples: … Read More
Given a string, the task is to count all palindrome substring in a given string. Length of palindrome substring is greater than or equal to… Read More
Given a string, Find the 1st repeated word in a string Examples: Input : "Ravi had been saying that he had been there" Output :… Read More
Given a binary tree, find all duplicate subtrees. For each duplicate subtree, we only need to return the root node of any one of them.… Read More
Given an array of items, an i-th index element denotes the item id’s, and given a number m, the task is to remove m elements… Read More
Given an array of n numbers. Your task is to read numbers from the array and keep at-most K numbers at the top (According to… Read More
Ram and Shyam want to choose a website to learn programming and they both have a list of favorite websites represented by strings.You need to… Read More
Given a read-only array of size ( n+1 ), find one of the multiple repeating elements in the array where the array contains integers only… Read More
Given an array of n words. Some words are repeated twice, we need to count such words. Examples: Input : s[] = {"hate", "love", "peace",… Read More
Given Postorder and Inorder traversals, construct the tree. Examples: Input: in[] = {2, 1, 3}post[] = {2, 3, 1} Output: Root of below tree … Read More
unordered_map is an associated container that stores elements formed by the combination of a key value and a mapped value. The key value is used… Read More
Given two binary arrays, arr1[] and arr2[] of the same size n. Find the length of the longest common span (i, j) where j >=… Read More