fixed errors, added a new comdition to the for loop
Merge branch 'master' of https://github.com/teeeya/Sorting