Available in: Redis Stack
Time complexity: O(n * k) where n is the number of items and k is the depth
Adds an item to the data structure. Multiple items can be added at once. If an item enters the Top-K list, the item which is expelled is returned. This allows dynamic heavy-hitter detection of items being entered or expelled from Top-K list.
[] otherwise..
redis> TOPK.ADD topk foo bar 42
1) (nil)
2) baz
3) (nil)