## set vs unordered_set in C++ STL

Pre-requisite : set in C++, unordered_set in C++ Differences : | set | unordered_set ——————————————————— Ordering | increasing order | no ordering | (by default)… Read More »

- Load Factor and Rehashing
- Design a data structure for LRU Cache
- Count number of Distinct Substring in a String
- Hashing in Java
- Elements that occurred only once in the array
- Print all pairs with given sum
- Sum of all odd frequency elements in an array
- For each element in 1st array count elements less than or equal to it in 2nd array | Set 2
- Design a Hit Counter
- Sort elements by frequency | Set 5 (using Java Map)
- LFU (Least Frequently Used) Cache Implementation
- Remove duplicates from unsorted array
- Count numbers in range such that digits in it and it's product with q are unequal
- Replace duplicates with greater than previous duplicate value
- Preorder from Inorder and Postorder traversals
- Microsoft Interview experience | Set 178 (On-Campus Internship for IDC)
- Find array elements with frequencies in range [l , r]
- Replace repeating elements with greater that greatest values
- Longest subarray having maximum sum
- Applications of Hashing
- MD5 hash in Java
- Longest substring with count of 1s more than 0s
- Count the number of vowels occurring in all the substrings of given string
- Find the element having different frequency than other array elements
- Check if the frequency of all the digits in a number is same
- Reduce the string by removing K consecutive identical characters
- Replace every elements in the array by its frequency in the array
- Number of anomalies in an array
- Find the largest area rectangular sub-matrix whose sum is equal to k
- Majority element in a circular array of 0's and 1's

Pre-requisite : set in C++, unordered_set in C++ Differences : | set | unordered_set ——————————————————— Ordering | increasing order | no ordering | (by default)… Read More »

Consider a tree with n nodes and root. You can jump from one node to any other node on the same height a maximum of… Read More »

Given n elements, write a program that prints the longest increasing subsequence whose adjacent element difference is one. Examples: Input : a[] = {3, 10,… Read More »

Given N elements, write a program that prints the length of the longest increasing subsequence whose adjacent element difference is one. Examples: Input : a[]… Read More »

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

Given an array of length N that contains only integers, the task is to print the special numbers of array. A number in this array… Read More »

Given an array, count pairs in the array such that one element of pair divides other. Examples: Input : arr[] = {1, 2, 3} Output… Read More »

Given a graph with N nodes numbered from 1 to N and M edges and an array of numbers from 1 to N. Check if… Read More »

Direct Address Table is a data structure that has the capability of mapping records to their corresponding keys using arrays. In direct address tables, records… Read More »

Given an array of n integers, slope of a line i. e., m and the intercept of the line i.e c, Count the number of… Read More »

Given an array of N non-negative integers, task is to find the maximum size of a subarray such that the pairwise sum of the elements… Read More »

Given an array of n-integers. Array may contain repetitive elements but the highest frequency of any elements must not exceed two. You have to make… 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), task if to print the largest palindromic number obtained by permuting the digits of N. If it is not possible to make… Read More »

Given a set S (all distinct elements) of integers, find the largest d such that a + b + c = d where a, b,… Read More »