Complete the code to add a member with a score to a sorted set in Redis.
ZADD leaderboard 1500 [1]
The ZADD command requires the score before the member name. Here, 1500 is the score.
Complete the code to retrieve the top 3 members with the highest scores from the sorted set.
ZREVRANGE leaderboard 0 [1] WITHSCORES
Indexes start at 0, so to get the top 3 members, use 0 2 as the range.
Fix the error in the code to get the rank of 'player5' in ascending order.
ZRANK leaderboard [1]ZRANK with ZREVRANK.The ZRANK command requires the member name to find its rank.
Fill both blanks to increment the score of 'player3' by 100 in the sorted set.
ZINCRBY leaderboard [1] [2]
ZINCRBY takes the key, the increment amount, and the member name in that order.
Fill both blanks to remove members with scores between 1000 and 2000 from the sorted set.
ZREMRANGEBYSCORE leaderboard [1] [2]
-inf or +inf incorrectly.ZREMRANGEBYSCORE removes members with scores in the given range, inclusive.