Add solutions and unit tests for chapter 4: Trees and Graphs