Implement the upperBound function in order to satisfy the tests

Hi Riley. Here's my answer. All tests pass.

I've added comments to explain how the solution works. I'd probably not add so many comments in my own code, truth be told, but since it's trying to be illustrative I'll break my own rules :)

Thanks. Looking forward to speaking with you on Thursday.

Johnny