Miscellaneous

## Find the two non-repeating elements in an array of repeating elements

Asked by SG My Personal Notes arrow_drop_up Save

## Count number of bits to be flipped to convert A to B

Given two numbers ‘a’ and b’. Write a program to count number of bits needed to be flipped to convert ‘a’ to ‘b’. My Personal… Read More »

## Count set bits in an integer

Write an efficient program to count number of 1s in binary representation of an integer. Examples Input : n = 6 Output : 2 Binary… Read More »

## Let’s experiment with Networking

Most of us have studied Computer Networks in a very abstract manner. In other words, not many of us know how the abstract concepts of… Read More »

## Little and Big Endian Mystery

What are these? Little and big endian are two ways of storing multibyte data-types ( int, float, etc). In little endian machines, last byte of… Read More »

## Check for Integer Overflow

Write a “C” function, int addOvf(int* result, int a, int b) If there is no overflow, the function places the resultant = sum a+b in… Read More »

## 8 queen problem

The eight queens problem is the problem of placing eight queens on an 8×8 chessboard such that none of them attack one another (no two… Read More »

## Position of rightmost set bit

Write a one line C function to return position of first 1 from right to left, in binary representation of an Integer. I/P 18, Binary… Read More »

## Smallest power of 2 greater than or equal to n

Write a function that, for a given no n, finds a number p which is greater than or equal to n and is a smallest… Read More »