79722885

Date: 2025-08-01 19:13:32
Score: 1
Natty:
Report link

I dont think it can be done with 5 swaps and remain stable. 5 swaps and unstable, yes.

The reason I say this is swapping for non-contiguous elements is required for 5 swaps but in so doing, that defeats stability. Insertion Sort or Bubble Sort will guarantee stability but you are making sure that no contiguous element is not compared.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: SJHowe