shell sort implementation by wikipedia