# Tag Archives: HashSet

## Absolute distinct count in a Linked List

Given a Linked List consisting of integers, the task is to print the number of distinct absolute values present in the Linked List. Examples: Input:… Read More »

## Check if each element of an Array is the Sum of any two elements of another Array

Given two arrays A[] and B[] consisting of N integers, the task is to check if each element of array B[] can be formed by… Read More »

## Count of distinct Primonacci Numbers in a given range [L, R]

Given a range [L, R], the task is to count the Primonacii Number present in that given range. Primonacii numbers are the part of Primonacii… Read More »

## Count of array elements whose order of deletion precedes order of insertion

Given an initial array, A[] and a final array B[] both of size N containing integers from the range [1, N], where A[] represent the… Read More »

## K most occurring strings

Given an array arr[] of N strings and an integer K, the task is to print K strings which occurred the most number of times… Read More »

## Minimum distance between any most frequent and least frequent element of an array

Given an integer array arr[] of size N, the task is to find the minimum distance between any most and least frequent element of the… Read More »

## Find pairs in array whose sum does not exist in Array

Given an array arr[] consisting of N positive integers, the task is to print all pairs of array elements whose sum does not exist in… Read More »

## Lexicographically smallest array formed by at most one swap for every pair of adjacent indices

Given an array A[] of length N, the task is to find lexicographically smallest array by swapping adjacent elements for each index atmost once. Thus,… Read More »

## Number of Positions to partition the string such that atleast m characters with same frequency are present in each substring

Given a string str of lowercase English alphabets and an integer m. The task is to count how many positions are there in the string… Read More »

## Operations required to make the string empty

Given a string str, the task is to make the string empty with the given operation. In a single operation, you can pick some characters… Read More »

## Sum of elements whose square root is present in the array

Given an array arr[], the task is to find the sum of all those elements from the given array whose square root is present in… Read More »