Remove removes element specified at given key. Time complexity of this method is : O(log(N)).
(hash uint32)
| 540 | // |
| 541 | // Time complexity of this method is : O(log(N)). |
| 542 | func (sl *SkipList) Remove(hash uint32) *SkipListNode { |
| 543 | found := sl.dict[hash] |
| 544 | if found != nil { |
| 545 | sl.delete(found.score, hash) |
| 546 | return found |
| 547 | } |
| 548 | return nil |
| 549 | } |
| 550 | |
| 551 | // GetByScoreRangeOptions represents the options of the GetByScoreRange function. |
| 552 | type GetByScoreRangeOptions struct { |