How many floors can an egg be dropped without breaking?
Question: You have two identical eggs. Standing in front of a 100 floor building, you wonder what is the maximum […]
Question: You have two identical eggs. Standing in front of a 100 floor building, you wonder what is the maximum […]
Suppose you had a Stack class. Write a new class MaxStack which, in addition to push() and pop(), has a
How can you get a fair coin toss if someone hands you a coin that is weighted to come up
What is the most efficient way, memory-wise, to store 1 million phone numbers? Apparently this is an interview question at
A typical programming interview question is “reverse a string, in place”. if you understand pointers, the solution is simple. even
Problem: you have 100 doors in a row that are all initially closed. you make 100 passes by the doors
Problem: you have two jars, 50 red marbles, 50 blue marbles. you need to place all the marbles into the
problem: two trains enter a tunnel 200 miles long (yeah, its a big tunnel) travelling at 100 mph at the
Problem: write the definition for this function without using any built-in functions. if pStr is null, return 0. if pStr
Two MIT math grads bump into each other at Fairway on the upper west side. They haven’t seen each other
Problem: this year on October 2, 2001, the date in MMDDYYYY format will be a palindrome (same forwards as backwards).10/02/2001when
Problem: you are given a sequence of numbers from 1 to n-1 with one of the numbers repeating only once.
Five pirates have 100 gold coins. they have to divide up the loot. in order of seniority (suppose pirate 5
100 fogcreek programmers are lined up in a row by an assassin. the assassin puts red and blue hats on them.
A bad king has a cellar of 1000 bottles of delightful and very expensive wine. A neighbouring queen plots to