Category: interview questions
Given an array of numbers (for simplicity, we use integers), find the maximum value of abs(max left – max right) where we separate the array into two. Mathematically, given …
This is another classic interview question: You are asked to write a function (in C/C++) that determines the number of bits required to convert one integer to another. The …
Given two 32-bit integers N and M, write a function to replace N (between bits position i and j) with M, so M becomes a substring of N located …
This is a classic interview question: You are asked to write a function that returns a bigger number of both, without using any comparison operator, such as if, or …
The Interview Question: Assume the Rand5() gives a random integer from 1 to 5. Each possible return is given with the same probability. How do you construct the Rand7() …