DandyLyons/swift-stack
A Swifty implementation of the Stack data structure. (LIFO: Last-in, First-out)
Usage
import SwiftStack
let stack = Stack<Int>()
stack.push(1)
stack.push(2)
stack.push(3)
print(stack.pop()) // 3
print(stack.pop()) // 2
print(stack.pop()) // 1Installation
Swift Package Manager
Add the following to your Package.swift file:
dependencies: [
.package(url: "https://github.com/DandyLyons/swift-stack", from: "1.0.0")
]Licensing
This stack implementation was originally released in the Swift Algorithm Club repository. It was originally released under the MIT license. See the original repo, kodecocodes/swift-algorithm-club for more information. You can find the original license in the swift-algorithm-club LICENSE.txt file.
I have made some modifications to the original code in order to make it a Swift package, and update to modern Swift. This repo is also released under the MIT license which you can find in the LICENSE.txt file in this repo.
Package Metadata
Repository: DandyLyons/swift-stack
Stars: 1
Forks: 0
Open issues: 0
Default branch: main
Primary language: swift
License: MIT
README: README.md