## Count unique numbers that can be generated from N by adding one and removing trailing zeros

Given a number N. Add one to the number in the first step and if the number has trailing zeros, remove all the trailing zeros… Read More »

- Count distinct elements in an array
- k-th missing element in an unsorted array
- Number of unique pairs in an array
- Check if the array has an element which is equal to product of remaining elements
- Number of strings that satisfy the given condition
- unordered_set operators in C++ STL
- How to create an unordered_set of user defined class or struct in C++?
- Largest sub-set possible for an array satisfying the given condition
- Total distinct pairs of ugly numbers from two arrays
- Number of ways to choose an integer such that there are exactly K elements greater than it in the given array
- Count unique numbers that can be generated from N by adding one and removing trailing zeros

Given a number N. Add one to the number in the first step and if the number has trailing zeros, remove all the trailing zeros… Read More »

Given two arrays arr1[] and arr2[] of sizes N and M where 0 ≤ arr1[i], arr2[i] ≤ 1000 for all valid i, the task is… Read More »

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 N strings of equal lengths. The strings contain only digits (1 to 9). The task is to count the number of strings that have… 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 »

Unordered_set provides two operators in C++ STL. These are: Syntax: 1. (unordered_set &lhs == unordered_set &rhs) 2. (unordered_set &lhs != unordered_set &rhs) These operators are… 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 an unsorted array, count all distinct elements in it. Examples: Input : arr[] = {10, 20, 20, 10, 30, 10} Output : 3 There… Read More »

Given an array arr[] and an integer K. The task is to find the size of the maximum sub-set such that every pair from the… Read More »

The unordered_set internally implements a hash table to store elements. By default we can store only pre definded type as int, string, float etc. If… Read More »

Given an array of N elements, the task is to check if the array has an element which is equal to the product of all… Read More »

Given a sorted array (with unique entries), we have to find whether there exist an element(say X) which is exactly half the sum of all… Read More »

Given an array of elements and change the array in such a way that all the elements on the array are distinct. if you are… Read More »

Given an integer array, if any integer is repeating then replace it with a number greater than that number which has not been inserted yet… Read More »

Given a linked list, and a product K. The task is to check if there exist two numbers in the linked list whose product is… Read More »