Hacker News new | ask | show | jobs
by latch 3923 days ago
You mean, akin to the redis documentation?

http://redis.io/commands/sort

"Time complexity: O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is currently O(N) as there is a copy step that will be avoided in next releases."