## Powers of 2 to required sum

Given an integer N, task is to find the numbers which when raised to the power of 2 and added finally, gives the integer N.… Read More »

Given an integer N, task is to find the numbers which when raised to the power of 2 and added finally, gives the integer N.… Read More »

Given a set S of N numbers and a range specified by two numbers L (Lower Bound) and R (Upper Bound). Find the number of… Read More »

Given a number, check whether it is even or odd. Input: n = 11 Output: Odd Input: n = 10 Output: Even Recommended: Please try… Read More »

Here is a cipher algorithm, based on hexadecimal strings that is implemented by XORing the given plaintext, N number of times where N is its… Read More »

When adding two binary numbers by hand we keep the carry bits in mind and add it at the same time. But to do same… Read More »

Baum Sweet Sequence is an infinite binary sequence of 0s and 1s. The nth term of the sequence is 1 if the number n has… Read More »

Given a integer n, we need to find how many digits remove from the number to make it a perfect square. Examples: Input : 8314… Read More »

Given an array of N numbers. Find out the number of pairs i and j such that i < j and Ai and Aj have… Read More »

You are given a sequence of N integers and Q queries. In each query, you are given two parameters L and R. You have to… Read More »

Given N, the row number of Pascal’s triangle(row starting from 0). Find the count of odd numbers in N-th row of Pascal’s Triangle. Prerequisite :… Read More »

Python doesn’t provide any inbuilt method to easily convert floating point decimal numbers to binary number. So, Let’s do this manually. Approach : To convert… Read More »

Given an array arr[] of n positive integers. The task is to check if there exist any subset of the array whose bitwise AND is… Read More »

A Levelwise OR/XOR alternating segment tree is a segment tree, such that at every level the operations OR and XOR alternate. In other words at… Read More »

Booth’s algorithm is a multiplication algorithm that multiplies two signed binary numbers in 2’s compliment notation. Booth used desk calculators that were faster at shifting… Read More »

Given an array of N(always a power of 2) elements and Q queries. Every Query consists of two elements index and value.. We need to… Read More »