## Queries On Array with disappearing and reappearing elements

Given an array arr[] of size N. Each second an integer disappears for N seconds and after N seconds, it reappears at its original position.… Read More »

- Kth smallest element in a subarray
- Find the smallest positive number missing from an unsorted array | Set 3
- Remove duplicates from unsorted array using Set data structure
- Pair with largest sum which is less than K in the array
- Find the minimum number of moves to reach end of the array
- Sum of digits with even number of 1's in their binary representation
- Minimum number of Fibonacci jumps to reach end
- Calculate height of Binary Tree using Inorder and Level Order Traversal
- Reduce number to a single digit by subtracting adjacent digits repeatedly
- Count smaller elements on right side and greater elements on left side using Binary Index Tree
- Find sum of a[i]%a[j] for all valid pairs
- Find minimum changes required in an array for it to contain k distinct elements
- Maximum subsequence sum such that all elements are K distance apart
- Make the list non-decreasing by changing only one digit of the elements
- Queries for number of distinct elements in a subarray | Set 2
- Sort an array of strings according to string lengths using Map
- Count of triplets that satisfy the given equation
- Quadruplet pair with XOR zero in the given Array
- Number of Subsequences with Even and Odd Sum
- Find number of triplets in array such that a[i]>a[j]>a[k] and i<j<k
- Recursive program to find all Indices of a Number
- Find the sum of all possible pairs in an array of N elements
- Find the winner of the match | Multiple Queries
- Find subarray with given sum with negatives allowed in constant space
- Sum of the sums of all possible subsets
- Smallest element greater than X not present in the array
- Minimum Bitwise XOR operations to make any two array elements equal
- Minimum number of Bottles visible when a bottle can be enclosed inside another Bottle
- Optimal Strategy for a Game | Set 3
- Subsequence X of length K such that gcd(X[0], X[1]) + (X[2], X[3]) + ... is maximized

Given an array arr[] of size N. Each second an integer disappears for N seconds and after N seconds, it reappears at its original position.… Read More »

Given a string str of length L and an integer N, the task is to form a total of (L / N) contiguous subsegments of… Read More »

Given an array arr[] of N integers, the task is to find the count of all the subsequences of the array that have positive product.… Read More »

Given an array arr[], the task is to find out the maximum obtainable value. The user is allowed to add or multiply the two consecutive… Read More »

Given an array arr[] of non-negative integers, let’s define X as the XOR of all the array elements and S as the sum of all… Read More »

Given an array arr[], the task is to find the number of pairs (arr[i], arr[j]) in the array such that arr[i] + arr[j] = arr[i]… Read More »

Given an array arr[] consisting of N elements, the task is to remove minimum number of elements from the ends of the array such that… Read More »

Given a sorted array arr[] of length N and an integer K such that K < N, the task is to remove exactly K elements… Read More »

Given an array arr[] of N integers, the task is to find the largest subset of arr[] such that in every pair of numbers from… Read More »

Given an array arr[] of N elements and an integer S. The task is to find the minimum number K such that the sum of… Read More »

Given an array arr[] of N integers, the task is to find the smallest number that divides the minimum number of elements from the array.… Read More »

Given an array arr[] of length N, the task is to remove the minimum number of elements from the ends of the array to make… Read More »

Given two 2D arrays b[][] and c[][] of N rows and M columns. The task is to minimise the absolute difference of the sum of… Read More »

Given an array arr[] of N positive integers, the task is to find the minimum number of elements to be deleted from the array so… Read More »