Priceton Algs4 Programming Assignment - week 3