Posted on January 7, 2015
Interview practice: Racing horses
This one is a puzzle question. I’m personally not the biggest fan of these types of problems and would never ask something like this in an interview. That being said, they are kind of fun, and the following… Read More
Posted on January 21, 2014
Interview questions: Sorting a terabyte of integers with a gigabyte of memory (part 2)
In the previous article, I mentioned that the mergesort algorithm could be modified in order to solve this problem. The usual mergesort implementation assumes that all the unsorted elements can fit into main memory. The algorithm divides the… Read More
Posted on January 15, 2014
Interview questions explained: Sorting a terabyte of integers with a gigabyte of memory
Given a terabyte of unsorted 32-bit unsigned integers on disk and only one gigabyte of memory, sort the integers. At first glance, mergesort would be the first solution that comes to mind. However, the typical mergesort implementation assumes… Read More
Posted on December 27, 2013
Interview questions explained: Fun with multiplication!
Write a method that takes as its input an array of integers. For each element in the array, print the product of all the other elements in the array. For example, given the following array: [1,2,3,4,5] The output… Read More