# Partition

I am surprised I don’t have a note on this. There are some Competitive Programming problems on this, for optimal partitioning.

If you’re thinking about partitioning memory in an OS, see Memory Partitioning.

### Set Theory

In mathematics, a partition of a set is a grouping of its elements into non-empty subsets, in such a way that every element is included in exactly one subset.

### Competitive Programming

### CS240

Used in Quickselect and Quicksort.