Pattern recognition homework for Princeton's online algorithm course