manuel-freire/ed

Code for the 2022-23 edition of Data Structures (group I) at Facultad de Informática UCM

★ 2Forks 3C++GitHub ↗Compare

README

ed

Code for the 2025-26 edition of Data Structures (group I) at Facultad de Informática UCM.

These collections are similar (in API) to those of the standard C++ library, but their implementation is meant to be (much) easier to follow.

Contents

Documentation is in doc.

Source-code for official adts is in adts, where

  • all depend on Exceptions.h being available, as sole dependency (so far).

  • Sequential ADTs include some base containers (single and doubly-linked lists), and derived Stack and Queue ADTs built on such containers.

    • Stack.h is a stack backed by a dynamic array
    • LinkedListStack.h is another stack backed by a singly-linked list with a phantom node
    • Queue.h is a queue backed by a doubly-linked list
    • ListSingle.h is a singly-linked list, also usable as a stack
    • List.h is a doubly-linked list, and is the only sequential ADT (in this library) with iterators.
  • Branching ADTs include two versions of an (unbalanced) binary tree using reference-counting to allow multiple trees to share internal nodes. All have iterators.

    • BinTree.h uses manual reference counting
    • BinTreeSmart.h is identical, but relies instead on C++ smart shared pointers (which wrap pointers with some reference-counting logic).
  • Associative ADTs include both a (non-balanced) TreeMap and a HashMap; and a TreeSet that is very similar to the TreeMap in its implementation

    • TreeSet.h is nice to de-duplicate and sort collections.
    • TreeMap.h provides an efficient key-value store that only requires keys to implement a less-than operator.
    • HashMap.h uses the hash functions implemented in Hash.h to provide O(1) lookups.

Contributors

manuel-freire

Issues