Complete the code to get the rank of member 'alice' in the sorted set 'players'.
ZRANK players [1]The ZRANK command returns the rank of the specified member in the sorted set. Here, we want the rank of 'alice'.
Complete the code to get the reverse rank of member 'bob' in the sorted set 'scores'.
ZREVRANK scores [1]ZRANK instead of ZREVRANK for reverse rank.The ZREVRANK command returns the rank of the member when the sorted set is ordered from highest to lowest score. Here, we want the reverse rank of 'bob'.
Fix the error in the code to get the rank of 'charlie' in the sorted set 'leaderboard'.
ZRANK [1] charlieThe first argument to ZRANK is the sorted set name. Here, it should be 'leaderboard' to match the intended sorted set.
Fill both blanks to get the reverse rank of 'dave' in the sorted set 'game_scores'.
ZREVRANK [1] [2]
The command ZREVRANK requires the sorted set name first, then the member name. Here, 'game_scores' is the sorted set and 'dave' is the member.
Fill all three blanks to get the rank of 'eve' in the sorted set 'highscores' and then get the reverse rank of 'frank' in the same set.
ZRANK [1] [2] ZREVRANK [3] frank
Both commands use the sorted set name 'highscores'. The first command finds the rank of 'eve', the second finds the reverse rank of 'frank'.