## Number of subsets with a given OR value

Given an array arr[] of length N, the task is to find the number of subsets with a given OR value M. Examples: Input: arr[]… 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 length N, the task is to find the number of subsets with a given OR value M. Examples: Input: arr[]… Read More »

Given an array arr of length N and an integer X, the task is to find the number of subsets whose AND value is X.… Read More »

Given an array arr[] of length N, the task is to find the overall sum of subsets of all the subsets of the array. Examples:… Read More »

This article explains how to set or change the value of unsigned char array during runtime in C. Given: Suppose we have an unsigned char… Read More »

Given N ranges [L, R] with velocities vel[]. The task is to assign each range a direction i.e. either left or right. All the ranges… Read More »

Given an array arr[] of size N. The task is to find the number of K‘s such that the array can be divided into two… Read More »

Consider n points on the Cartesian Coordinate Plane. Let point (Xi, Yi) is given a value Vi. A line parallel to y-axis is said to… Read More »

Given a floating point number N, the task is to check whether it is palindrome or not. Input: N = 123.321 Output: Yes Input: N… Read More »

Given an array arr[] of N positive integers. The task is to find the count of pairs (arr[i], arr[j]) such that the maximum power of… Read More »

Given an array arr[] of size N, the task is to check if it is possible to make the array non-decreasing by applying the given… Read More »

Given an array arr[] of size N. The task is to find maximum element among N – 1 elements other than arr[i] for each i… Read More »

Given that N people are sitting in a circular queue numbered from 1 to N, the task is to count the number of ways to… Read More »

Given a string str consisting of lowercase English alphabets. The task is to change each character of the string with the next letter (in a… Read More »

Given two arrays A[] and B[], the task is to choose two elements X and Y such that X belongs to A[] and Y belongs… Read More »

Given an array arr[] of N integers where N is even, the task is to group the array elements in the pairs (X1, Y1), (X2,… Read More »