Adds comparator to shell sort