Collection Sets
- Updated2025-01-22
- 2 minute(s) read
Collection Sets
A set groups unique elements of the same data type in sorted order. Inserting a new element modifies the set only if that element does not already exist in the set.
|
|
![]() |
Element |
![]() |
Size—Number of elements in the set |
![]() |
Wires of set—Wire color matches the data type color of the element |
Because a set maintains elements in sorted order, a set allows faster search, insertion, modification, and removal operations on the data than unordered data structures, such as arrays, even when the data size is large. A set has memory overhead to maintain the elements in sorted order, which arrays do not have.