I have an already sorted set in memory of size (N) and want to dump it into redis, can it be done in O(N) if inserted head or tail first? or it doesn't matter, and the insertion will be O(log(N!)) ~ O(N log(N))
For further details, redis sorted sets are implemented using a hashmap and a skiplist (for the ordering).
EDIT: this question remains unanswered since quite a bit, or at least the answer is a bit ambiguous for me: Redis: Is ZADD better than O(logN) when the inserted element is at the beginning or end?