0
0
Redisquery~10 mins

SUNION, SINTER, SDIFF set operations in Redis - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to get the union of sets 'set1' and 'set2'.

Redis
SUNION [1]
Drag options to blanks, or click blank then click option'
Aset1 set2
Bset1
Cset2
Dset3
Attempts:
3 left
💡 Hint
Common Mistakes
Using only one set name returns just that set's members.
Using commas instead of spaces between set names.
2fill in blank
medium

Complete the code to find the intersection of sets 'fruits' and 'citrus'.

Redis
SINTER [1]
Drag options to blanks, or click blank then click option'
Afruits,citrus
Bfruits citrus
Cfruits
Dcitrus
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas between set names causes syntax errors.
Providing only one set name returns that set's members.
3fill in blank
hard

Fix the error in the code to get the difference of sets 'A' and 'B'.

Redis
SDIFF [1]
Drag options to blanks, or click blank then click option'
AA B
BB
CA
DA,B
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas between set names causes errors.
Using only one set name returns that set's members.
4fill in blank
hard

Fill all three blanks to get the union of 'setX' and 'setY' and store it in 'resultSet'.

Redis
SUNIONSTORE [1] [2] [3]
Drag options to blanks, or click blank then click option'
AresultSet
BsetX
CsetY
DsetZ
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping destination and source sets.
Using a set name that doesn't exist.
5fill in blank
hard

Fill all three blanks to store the difference of 'set1' and 'set2' in 'diffSet'.

Redis
SDIFFSTORE [1] [2] [3]
Drag options to blanks, or click blank then click option'
AdiffSet
Bset1
Cset2
Dset3
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of arguments.
Using a wrong set name.