Jump to content

Category talk:Online sorts

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

I'm pretty sure cyclesort is not an online algorithm. Looking at the algorithm it seems to go back and forth swapping elements for all cycles. Can someone explain how this is online? As I understand it, insertion sort is online because you take an incoming element and insert it into your sorted list. Cyclesort needs to place an element in its final position and you can't know where that position is unless you have access to the entire list at every point. Teratoid heights (talk) 11:00, 21 February 2019 (UTC)[reply]