October 2007


Technology13 Oct 2007 09:58 pm

Crossed my mind while chatting with a friend earlier today… How far can you browse without a keyboard. If you’ve got a browser home page with a search box, or a bookmark to Google, you could go there, copy some word on the page, paste it in, search, grab some letters from the summaries, construct words to search for.

For example, copy the word about from Google’s home page, and paste it in, then search.

Ok that page were more than enough letters to make the word kstruct and hence make my way here.

Technology07 Oct 2007 09:41 pm

There is a linked list of numbers of length N. N is very large and you don’t know N. You have to write a function that will return k random numbers from the list. Numbers should be completely random.

This one seems pretty simple. Walk the list, generating a new random number for each entry. Keep a ‘top k’ chart of the highest random numbers, and their associated entries. When we hit the end of the list, the numbers in the chart are the required random numbers.

Anyone have better methods?