lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> > [...] and at least one [1] stable, in-place
> > comparison sort with worst-case time of O(n*log(n)) is now known,
> > which is however very complicated to program.
> 
> Thank you for sharing this algorithm!
> 
> Its implementation in C is about 1000 lines.
> https://github.com/BonzaiThePenguin/WikiSort/blob/master/WikiSort.c
> 
> $ wc -l ltablib.c
> 357 ltablib.c

That is the entire library. The 'sort' function takes ~100 lines.

-- Roberto