79090156

Date: 2024-10-15 13:29:10
Score: 1.5
Natty:
Report link

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?

Reasons:
  • No code block (0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: Olof Forshell