Techinterview - techinterview.org - Tech Interview

Latest News:

Getting a fair result with an unfair coin 12 Feb 2011 | 02:41 am

How can you get a fair coin toss if someone hands you a coin that is weighted to come up heads more often than tails?

We are NY Tech asks: “How many unique areas of human knowledge have the right size of... 6 Jan 2011 | 08:12 am

We are NY Tech asks: “How many unique areas of human knowledge have the right size of passionate users to make it as a Stack Exchange site?” Answer: 30,000.

Storing 1 million phone numbers 30 Nov 2010 | 12:50 pm

What is the most efficient way, memory-wise, to store 1 million phone numbers?  Apparently this is an interview question at Google, although this seems like its a bit too easy.

Reverse a String 17 Apr 2010 | 07:33 am

A typical programming interview question is “reverse a string, in place”. if you understand pointers, the solution is simple. even if you don’t, it can be accomplished using array indices. i usually a...

100 Doors in a Row 17 Apr 2010 | 07:31 am

Problem: you have 100 doors in a row that are all initially closed. you make 100 passes by the doors starting with the first door every time. the first time through you visit every door and toggle the...

Red Marbles, Blue Marbles 17 Apr 2010 | 07:26 am

Problem: you have two jars, 50 red marbles, 50 blue marbles. you need to place all the marbles into the jars such that when you blindly pick one marble out of one jar, you maximize the chances that it...

Bumblebee 17 Apr 2010 | 07:13 am

problem: two trains enter a tunnel 200 miles long (yeah, its a big tunnel) travelling at 100 mph at the same time from opposite directions. as soon as they enter the tunnel a supersonic bee flying at ...

int atoi( char* pStr ) 17 Apr 2010 | 07:12 am

Problem: write the definition for this function without using any built-in functions. if pStr is null, return 0. if pStr contains non-numeric characters, either return 0 (ok) or return the number deri...

Daughters' Ages 17 Apr 2010 | 07:09 am

Two MIT math grads bump into each other at Fairway on the upper west side. They haven’t seen each other in over 20 years. the first grad says to the second: “how have you been?” second: “great! i got...

Palindromes 17 Apr 2010 | 07:07 am

Problem: this year on October 2, 2001, the date in MMDDYYYY format will be a palindrome (same forwards as backwards). 10/02/2001 when was the last date that this occurred on? (see if you can do it in ...

Recently parsed news:

Recent searches: