## k-th missing element in an unsorted array

Given an unsorted sequence a[], the task is to find the K-th missing contiguous element in the increasing sequence of the array elements i.e. consider… Read More »

- Remove duplicates from unsorted array
- Design a data structure for LRU Cache
- Hashing in Java
- Load Factor and Rehashing
- Sort elements by frequency | Set 5 (using Java Map)
- Design a Hit Counter
- Elements that occurred only once in the array
- Longest subarray having maximum sum
- Count distinct elements in an array
- Sum of all odd frequency elements in an array
- HashSet vs TreeSet in Java
- For each element in 1st array count elements less than or equal to it in 2nd array | Set 2
- Preorder from Inorder and Postorder traversals
- Counting frequencies of array elements
- Sort the array of strings according to alphabetical order defined by another string
- Count numbers in range such that digits in it and it's product with q are unequal
- Check if it is possible to reach a number by making jumps of two given length
- Applications of Hashing
- Number of pairs whose sum is a power of 2
- Print all pairs in an unsorted array with equal sum
- Replace duplicates with greater than previous duplicate value
- Count distinct substrings that contain some characters at most k times
- Count occurrences of a string that can be constructed from another given string
- Maximum length substring with highest frequency in a string
- Count the number of vowels occurring in all the substrings of given string
- Replace repeating elements with greater that greatest values
- Find array elements with frequencies in range [l , r]
- Choose atleast two elements from array such that their GCD is 1 and cost is minimum
- Find the largest area rectangular sub-matrix whose sum is equal to k
- Find the element having different frequency than other array elements

Given an unsorted sequence a[], the task is to find the K-th missing contiguous element in the increasing sequence of the array elements i.e. consider… Read More »

Given a character array arr[] containing only lowercase English alphabets, the task is to print the maximum length of the subarray such that the first… Read More »

Given an array of N numbers, the task is to find the number of sub-arrays (size of the sub-array should be an even number) of… Read More »

Given an array arr[] and an integer k, the task is to find the maximum product from the array such that the frequency sum of… Read More »

Given an array arr[] of N elements, the task is to find the length of the longest sub-sequence in arr[] such that all the elements… Read More »

Given a Binary Tree with distinct values, the task is to print the first smallest root to leaf path. We basically need to print the… Read More »

Given n sentences. The task is to count the number of words that appear in all of these sentences. Note that every word consists of… Read More »

Given an array arr[], the task is to print the count of unique pairs (arr[i], arr[j]) such that i < j. Examples: Input: arr[] =… Read More »

Given an array arr[] of N elements and an integer K, the task is to find the number of ways of choosing an integer X… Read More »

Given an integer N, the task is to find out whether it can be written as a sum of 2 triangular numbers (which may or… Read More »

Given two strings str1 and str2 where str1 being the parent string. The task is to find out the number of string as str2 that… Read More »

Given an array of N elements, the task is to find all the unique pairs that can be formed using the elements of a given… Read More »

Given two integer arrays arr[] and cost[] where cost[i] is the cost of choosing arr[i]. The task is to choose a subset with at least… Read More »

Given a starting position ‘k’ and two jump sizes ‘d1’ and ‘d2’, our task is to find the minimum number of jumps needed to reach… Read More »

Given a Binary Tree, return following value for it. For every level, compute sum of all leaves if there are leaves at this level. Otherwise… Read More »