Skip to content

Tag Archives: cpp-unordered_map

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 an unsorted array of integers, find a subarray that adds to a given number. If there is more than one subarray with the sum… 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 key-value and a mapped value. The key value is used to uniquely… 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
Let us consider the below traversals: Inorder sequence: D B E A F C  Preorder sequence: A B D E C F Recommended Practice Construct… Read More

Start Your Coding Journey Now!