Tags: , | Posted by Admin on 5/10/2012 7:37 AM | Comments (1)
A friend of mine is interviewing for a job. One of the interview questions got me thinking, just wanted some feedback. There are 2 non-negative integers: i and j. Given the following equation, find an (optimal) solution to iterate over i and j in such a way that the output is sorted. 2^i * 5^j So the first few rounds would look like this: 2^0 * 5^0 = 1 2^1 * 5^0 = 2 2^2 * 5^0 = 4 2^0 * 5^1 = 5 2^3 * 5^0 = 8 2^1 * 5^1 = 10 2^4 * 5^0 = 16 2^2 * 5^1 = 20 2^0 * 5^2 = 25 Try as I might, I can't see a pattern. Your thoughts?
Tags: | Posted by Admin on 3/7/2012 12:44 PM | Comments (6)
For starters, don't just automatically act all "Game Over, man!" when you hit a dead end! Also, it helps to try to keep talking as you come up with an answer, because silence is very uncomfortable for both you and the interviewer!   There are companies that deal with numbers that will ask you some math questions. These are the kind of questions that you could use a computer or paper and pencil for.   According to a survey, 70 percent of the public likes coffee, and 80 percent likes tea. What are the upper and lower bounds of people who like both coffee and tea? At 3:15, what is the angle between the minute and hour hands on an analog clock? How many integers between 1 and 1, 000 contain a 3? A book has N pages, numbered the usual way, from 1 to N. The total number of digits in the page numbers is 1, 095. How many pages does the book have? How many 0s are at the end of 100 factorial? (That's 100 multiplied by every whole number smaller than itself, down to 1.)   If you like math, you'll love the above questions. If you don't...well, let's just say you're in for a world of hurt!