## 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 »

## Number of subsets with a given AND value

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 »

## Sum of subsets of all the subsets of an array | O(3^N)

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 »

## Set value of unsigned char array in C during runtime

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 »

## Find if there exists a direction for ranges such that no two range intersect

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 »

## Number of K’s such that the given array can be divided into two sets satisfying the given conditions

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 »

## Find Partition Line such that sum of values on left and right is equal

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 »

## Check whether the given floating point number is a palindrome

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 »

## Count of pairs in an array such that the highest power of 2 that divides their product is 1

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 »

## Make the array non-decreasing with the given operation

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 »

## Find the maximum element in the array other than Ai

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 »

## Count non-adjacent subsets from numbers arranged in Circular fashion

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 »

## Modify the string such that every character gets replaced with the next character in the keyboard

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 »

## Choose two elements from the given array such that their sum is not present in any of the arrays

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 »

## Maximum sum of minimums of pairs in an array

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 »