## Construct a frequency array of digits of the values obtained from x^1, x^2, …….., x^n

Given are two integers (x and n). The task is to find an array such that it contains the frequency of index numbers occurring in… Read More »

- k-th missing element in an unsorted array
- Check if it is possible to reach a number by making jumps of two given length
- Number of unique pairs in an array
- Choose atleast two elements from array such that their GCD is 1 and cost is minimum
- Count of words that are present in all the given sentences
- Minimum length substring with exactly K distinct characters
- Count occurrences of a string that can be constructed from another given string
- Find the longest string that can be made up of other strings from the array
- Sum of nodes in bottom view of Binary Tree
- Split the array elements into strictly increasing and decreasing sequence
- Sum of nodes in top view of binary tree
- Rearrange characters in a string such that no two adjacent are same using hashing
- Maximum length of the sub-array whose first and last elements are same
- Remove all occurrences of any element for maximum array sum
- Count duplicates in a given linked list
- Count of unique pairs (arr[i], arr[j]) such that i < j
- Find uncommon characters of the two strings | Set 2
- Minimum number of given operations required to convert a permutation into an identity permutation
- Number of subarrays such that XOR of one half is equal to the other
- Print the first shortest root to leaf path in a Binary Tree
- Count of pairs of strings which differ in exactly one position
- Two equal sum segment range queries
- Design a stack which can give maximum frequency element
- Count all elements in the array which appears at least K times after their first occurrence
- Flip minimum signs of array elements to get minimum sum of positive elements possible
- Minimum changes required to make a Catalan Sequence
- Find d to maximize the number of zeros in array c[] created as c[i] = d*a[i] + b[i]
- Maximum product from array such that frequency sum of all repeating elements in product is less than or equal to 2 * k
- Longest sub-sequence of array containing Lucas numbers
- Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array

Given are two integers (x and n). The task is to find an array such that it contains the frequency of index numbers occurring in… Read More »

Given two strings. The task is to check that is there any common character in between two strings. Examples: Input: s1 = “geeksforgeeks”, s2 =… Read More »

Design a data structure for LRU Cache. It should support the following operations: get and set. get(key) – Get the value (will always be positive)… Read More »

Given a string consisting of only lowercase English alphabets. The task is to find and replace the minimal number of characters by any lower case… Read More »

Given an integer array, sort the array according to the frequency of elements in decreasing order, if frequency of two elements are same then sort… Read More »

In this sorting algorithm, Hash Function f is used with the property of Order Preserving Function which states that if . Hash Function: f(x) =… Read More »

Given a string str containing only lowercase alphabets, the task is to minimize the length of the string after performing the following operation: Delete all… Read More »

Given N numbers, the task is to find the minimum removal of numbers such that GCD of the remaining numbers is greater than initial GCD… Read More »

Given two arrays (which may or may not be sorted) of sizes M and N respectively. There arrays are such that they might have some… Read More »

Given N ranges of L-R. The task is to print the number which occurs the maximum number of times in the given ranges. Note: 1… Read More »

Given a binary array arr[] of size n and a value k. The task is to find the length of the longest subarray having difference… Read More »

Consider n boxes numbered arranged in a circle in increasing order in clockwise direction (numbered from 1 to n). You are given q queries, each… Read More »

Given two unsorted arrays arr1[] and arr2[]. They may contain duplicates. For each element in arr1[] count elements less than or equal to it in… Read More »

Given two arrays arr1[] and arr2[]. The task is to find the count of such elements in the first array whose at-least one factor is… Read More »

Prerequisites: Hashing Introduction and Collision handling by separate chaining How hashing works: For insertion of a key(K) – value(V) pair into a hash map, 2… Read More »