Implementing shell sort and associated tests