Implemented a shell sort