Why Redis SortedSet uses Skip List instead of Balanced Tree?
问题 The Redis document said as below : ZSETs are ordered sets using two data structures to hold the same elements in order to get O(log(N)) INSERT and REMOVE operations into a sorted data structure. The elements are added to a hash table mapping Redis objects to scores. At the same time the elements are added to a skip list mapping scores to Redis objects (so objects are sorted by scores in this "view"). I can not understand very much. Could someone give me a detailed explanation? 回答1: Antirez