## Remove duplicates from unsorted array using Set data structure

Given an unsorted array of integers, print the array after removing the duplicate elements from it. We need to print distinct array elements according to… Read More »

## Find minimum changes required in an array for it to contain k distinct elements

Given an array arr of size N and a number K. The task is to find the minimum elements to be replaced in the array… Read More »

## Count smaller elements on right side and greater elements on left side using Binary Index Tree

Given an array arr[] of size N. The task is to find smaller elements on the right side and greater elements on the left side… Read More »

## Print all Increasing Subsequence of a List

Given a list or array of integer, the task is to print all such subsequences of this list such in which the elements are arranged… Read More »

## Sort an array of strings according to string lengths using Map

Given an array of strings, we need to sort the array in increasing order of string lengths, using Map Data Structure. Examples: Input: str[] =… Read More »

## Find the maximum sum of digits of the product of two numbers

Given an array arr[] of size N( > 2). The task is to find the maximum sum of digits of the product of any two… Read More »

## Find number of triplets in array such that a[i]>a[j]>a[k] and i<j<k

Given an array arr of size N. The task is to count number of triplets in the array such that a[i]>a[j]>a[k] and i<j<k Examples: Input… Read More »

## Minimum number of Binary strings to represent a Number

Given a number N. The task is to find the minimum number of binary strings required to represent the given number as the sum of… Read More »

## Lexicographical smallest alternate Array

Given an array arr[] of distinct elements, the task is to rearrange the array such that it is lexicographically smallest and of the form arr… Read More »

## Minimum number of Bottles visible when a bottle can be enclosed inside another Bottle

Given N bottles. The ith bottle has A[i] radius. Once a bottle is enclosed inside another bottle, it ceases to be visible. The task is… Read More »

## Find the smallest positive number missing from an unsorted array | Set 3

Given an unsorted array with both positive and negative elements. The task is to find the smallest positive number missing from the array. Examples: Input:… Read More »

## Find the winner of the match | Multiple Queries

Given an array of pairs arr of size N which represents a game situation where the first player wins against the second player. Given multiple… Read More »

## Sum of the sums of all possible subsets

Given an array a of size N. The task is to find the sum of the sums of all possible subsets. Examples: Input: a[] =… Read More »

## Longest alternative parity subsequence

Given an array a of size N. The task is to print the length of the longest alternative odd/even or even/odd subsequence. Examples: Input: a[]… Read More »

## Print the lexicographically smallest array by swapping elements whose sum is odd

Given an array of N integers. The task is to find the lexicographically smallest array possible by applying the given operation any number of times.… Read More »