Skip to content

Glossary: Algorithms Beyond the Basics in C++

std::tuple

Also written: tuple

Like a pair but with any number of fields. Kruskal's code stores each road as `tuple<int, string, string>`, which sorts field by field.

Where the book teaches it

Related terms

std::pairKruskal's algorithm