Skip to content

VGrokhotov/Swift-Data-Structures-and-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift Data Structures and Algorithms

Stack

TODO

Queue

Queue implementation in Swift

How to use

  1. The initialization
let queue: Queue<Int> = Queue()
  1. The insertion of element
queue.enqueue(3)
  1. The check are there any elements in the queue
if !queue.isEmpty {
    // Some code here
}
  1. The extraction of the element
// Use unwarping only when the queue is not Empty
let queueHead = queue.dequeue()!
  1. The amount of elements in the queue
let amount = queue.count
  1. The peek value
// Could be nil
let head = queue.peek()

HashMap on Chains

TODO

HashMap on Open Addressing

TODO

About

Different algorithms and data structures implementation in Swift

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages