Completed assignment 2 and randomized select algo