Ard chapter 7

Actually added ex6 this time
Pedantic comment - this solution may use more memory than some of the others presented due to loading all input before processing. I like it though, very easy to follow.