# Brainteasers

## What is the greatest dollar value in coins you can have in your hands without being able to make change for a dollar?

You have stacks of quarters, dimes, nickels and pennies (these represent \$0.25, \$0.10, \$0.05 and \$0.01, respectively, in the US monetary system for anyone international). There are an unlimited number of coins in each stack. You can take coins from a stack in any amount and in any order and place them in your hand. …

## What is the angle formed by the hands of the clock when it is 1:45?

142.5 degrees. If we just think of the clock hour hand at 1 and the minute hand at the 45 position (near 9 o’clock), that is 120 degrees since they are 4 “numbers” apart, and each number on the clock represents 30 degrees (360/12). However, recall that the hour hand has already moved by the …

## How would you test a calculator?

Test the functionality of the calculator’s computing accuracy by evaluating whether inputs provide their expected outputs. Also, test the device’s basic system functions — like the power button, the clear function, and so on, to determine whether you’ll be facing system errors before you can compute anything. Depending on the position for which you’re interviewing, …

## You are given a list of numbers…

When you reach the end of the list you will come back to the beginning of the list (a circular list). Write the most efficient algorithm to find the minimum # in this list. Find any given # in the list. The numbers in the list are always increasing but you don’t know where the …

## How many resumes does Google receive each year for software engineering?

A candiate for Quantitative Compensation Analyst should know that Google hired about 3,400 people in 2008. Figure 75%, or 2,550, of those hired were engineers and that, like Harvard, Google only accepted 3% of those who applied. 2,550 is 3% of 85,000.

## Design an algorithm to play a game of Frogger and then code the solution…

The object of the game is to direct a frog to avoid cars while crossing a busy road. You may represent a road lane via an array. Generalize the solution for an N-lane road. “One approach is to write a recursive algorithm that determines when to “wait” or to “jump” to the next lane, depending …