interview

Another Algorithm Job-Interview Question

Hi all: So here is the question: Suppose you have got 100 thousands integers which ranges from 1 to 1 million,please sort out the integers and its time complexity should be O(n) Anybody who shares his or her ideas is well appreciated. Thanks in advance! ...

How to sort millions of rows of data in a file with less/meagre memory

(From here) I attended an interview last week and this question was asked: How do you sort a billion rows of data in a file with only 640KB of memory in a 8080 processor based machine? No virtual memory, no external disk. I explicitly asked the interviewer if I could use a hard drive, so I can serialize trees as I sort them and then c...

Interview question: How do you explain a printer to your grandmother

I was recently asked this question at Miscrosoft. I had no clue. Any ideas? How do you explain a printer to your grandmother ...

Puzzle.. solving product of values in array X

Hello, Can you please help me solving this one? You have an unordered array X of n integers. Find the array M containing n elements where Mi is the product of all integers in X except for Xi. You may not use division. You can use extra memory. (Hint: There are solutions faster than O(n^2).) The basic ones - O(n^2) and one using divi...