I can't see how you determine the worst case of 37 for shellsort where n = 10. What I mean is what set of gaps did you use and are they the best set for n = 10?
I have found that the best set of gaps where n = 10 produces a worst case of 35 comparisons - which is why I ask.
But perhaps the original question wasn't concerned with the best set of gaps, maybe any set was ok to use?