# Set Math: Intersection/Union

> How do you find the elements common to two Redis Sets, all unique elements across them, or the elements in one but not the other?

Canonical: https://www.internhack.in/learn/interview/redis-caching/redis-set-operations
Last updated: 2026-11-28

Difficulty: Beginner

## Question

How do you find the elements common to two Redis Sets, all unique elements across them, or the elements in one but not the other?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

SINTER, SUNION, SDIFF, SINTERCARD, Hash tags in Cluster

Previous: [Redis VM/Swap (Legacy)](https://www.internhack.in/learn/interview/redis-caching/redis-swap-files-legacy) · Next: [Popping from Sorted Sets](https://www.internhack.in/learn/interview/redis-caching/redis-zpopmin-max) · [All of Redis & Caching](https://www.internhack.in/learn/interview/redis-caching)

## More Redis & Caching questions

- [LRU Accuracy](https://www.internhack.in/learn/interview/redis-caching/redis-max-memory-samples)
- [Core Data Types](https://www.internhack.in/learn/interview/redis-caching/redis-data-types)
- [Caching Strategies](https://www.internhack.in/learn/interview/redis-caching/redis-caching-strategies)
- [Eviction Policies](https://www.internhack.in/learn/interview/redis-caching/redis-eviction-policies)
- [Persistence: RDB vs. AOF](https://www.internhack.in/learn/interview/redis-caching/redis-persistence-rdb-aof)
- [Transactions & Atomicity](https://www.internhack.in/learn/interview/redis-caching/redis-transactions-multi)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Redis & Caching](https://www.internhack.in/learn/interview/redis-caching)
