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