HW 8 CS 170 Algorithms Fall 2014