Fix bug in reverse function
XMerge branch 'master' of https://github.com/iensen/Algorithms