GitHunt
AL

alvarorgtr/swift_data_structures

Data structures (lists, staks, queues, trees, treeMaps, heaps...) in Swift

swift_data_structures

The purpose of this project is to implement a series of well-known data structures in the swift programming language. Although this structures may be useful, the main focus of this project will be on learning about both the swift programming language and the inner workings of data structures.

Overview

Basic list of structures to be implemented:

  • Linear data structures:
    • Singly linked list
    • Doubly linked list
    • Queue
    • Stack
    • Deque (double ended queue)
  • Trees:
    • Tree maps:
      • AVL tree map
      • Left-leaning red-black tree map
  • Graphs:
    • Graph
    • Directed graph
    • Weighted graph
       - Algorithms:
      • Dijkstra
      • ...
  • Union-find
  • Heaps:
    • Binomial heap
    • Fibonacci Heap

When possible, each data structure will conform to the Sequence protocol, the Collection protocol or any of their children protocols. Moreover, new protocols for handling, for example, TreeMapCollections will be developed, to ease the creation of new TreeMap types.

WIP warning

Note that this whole project is a work in progress. If you use any of the structures, it is your responsibility to check if it is already on working order.

Languages

Swift99.4%Objective-C0.6%

Contributors

GNU General Public License v3.0
Created June 29, 2016
Updated March 21, 2024