Exercises from chapter 10 of Data Structures and Algorithms in Javascript by Michael McMillan