Refresh to get another 5 random questions
##
100 statements

##
Measure 4 quarts of water

##
k-th smallest element in the union of the two lists

##
Two random points in [0,1]

##
Determine if a number is a power of an integer

There are 100 statements, the $n$th statement says: among these 100 statement, at most $(n-1)$ are true. How many are true?

Tags: logic brainteaser

If you had an infinite supply of water and a 5 quart and 3 quart pail, how would you measure exactly 4 quarts?

--

collected from http://www.softwareinterview.com/

You are given two sorted lists of size m and n. Give an O(log m+log n) time algorithm for computing

the kth smallest element in the union of the two ...

Two i.i.d uniform random points x and y on the interval [0,1] result in three segments summing to 1.

(1) What is the expected length of the shortest ...

Tags: probability expectation

Describe an algorithm to find out if an integer is a square.