home page -> teaching -> data structures and algorithms -> ADT - summary

Abstract Data Types - summary

Bag

No requirement on elements; no uniqueness restriction; no defined order

Sequence (List and Vector)

Well defined order of elements inside the container.

Note: Vector offers fast get/set by index; List offers fast insert and remove in the middle. There is no qualitative difference.

Set

Elements must be equality comparable. Elements must be unique (two equal elements are not allowed). Order in collection is undefined.

Sorted Set

Elements must be equality comparable and less-than comparable. No duplicate are allowed. Order in collection is defined by the less-then comparison.

Map (Dictionary) and Sorted Map

Elements are key-value pairs. Keys are equality comparable (less-than comparable for ordered map). No duplicate keys are allowed. Order is defined by the less-than comparison on keys.

Stack, queue

No restriction on elements. Order is defined by LIFO (last in, first out) or FIFO (first in, first out) strategy.

Double-ended queue

Like for stack and queue, but allowing adding and removing at both ends.

Radu-Lucian LUPŞA
2016-03-08