Archive for January 16th, 2007

Work Woes

Posted by alex on January 16th, 2007

Yesterday I failed another interview. This time with Bloomberg. Hopefully I will soon be looking back on this from the wasted hours of my new job and wonder how I might have imagined what I would be doing at the then present time. Finding a job just takes time and persistence.

Anyway, these are some of the questions I remember which I was faced with almost as soon as I sat down:

  1. Given an integer, how could you find out whether it was odd or even?
  2. What properties does a Java Object object have?
  3. Write a function that returns the factorial of a given integer.
  4. Tell me what is wrong with this C code? (The code has a dangling pointer error in it).
  5. Given an 8bit integer, how would you count the number of binary “ones”?
  6. Given 8 coins, one of which is heavier than the others, how do you find the heavy coin using only two weighs of a old fashioned balance?
  7. Describe a binary tree. What can it be used for? How long does it take to search? Why does it take this long?
  8. Describe a hash table.
  9. Given a list of words, how would you find which words contained an anagram of themselves within that list?
  10. Given a list of words, how would you find the 25 most common words in that list?

I struggled answering questions 2, 4, 5, 9 and 10. I guess that’s why they didn’t want me. Still it was definitely interesting. I’ll have to research more about these questions and see if I can come up with some decent solutions.