Skip to content

Tag Archives: Algorithms-Bit Algorithms

Given two integers L and R. Determine the bitwise OR of all the integers in the range [L, R] (both inclusive). Examples:   Input: L =… Read More
Given L and R. The task is to find the number in whose binary representation all bits between the L-th and R-th index are set… Read More
What does the following C expression do? x = x & (x-1) (A) Sets all bits as 1 (B) Makes x equals to 0 (C)… Read More
What does the following C expression do? x = (x1); (A) Multiplies an integer with 7 (B) Multiplies an integer with 3.5 (C) Multiplies an… Read More
What is the return value of following function for arr[] = {9, 12, 2, 11, 2, 2, 10, 9, 12, 10, 9, 11, 2} and… Read More