Problem 11. Searching and Sorting

(a) I have a friend who answers only "yes" and "no" to all questions. He lives in a 16 story building and I want to find out what floor he lives on. My goal is to ask as few questions as possible. How can I do that?

(b) Is it possible to sort an array of 4 numbers with just 5 comparison operations? and with 4 comparison operations?