my answers to some of the questions in Sedgewick's algorithms book 4th edition in Java