Skip to content

greg/SwiftDataStructures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftDataStructures

Pure Swift implementations of useful data structures absent from the standard library.

Data structures:

  • PriorityQueue: a min- or max- priority queue
  • OrderedSet: an ordered set
  • OrderedDictionary: an ordered dictionary
  • List: doubly-linked list
  • Deque: double-ended queue with O(1) random access

In alignment with Swift's standard library, all data structures are implemented as structs with copy-on-write optimisation.

Lower-level API:

  • _PriorityQueueImpl: backing class used by PriorityQueue
  • _RBTree: Red-black binary tree

About

Pure Swift implementations of useful data structures absent from the standard library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published