CoreDataStructures is library of fundamental data structures written in Swift 5.3, therefore xcode toolchain 12.3+ is required to build this project. Actual components can be found in CoreDataStructures/Sources/CoreDataStructures/ directory.
import UIKit
import CoreDataStructures
class WelcomeViewController: UIViewController {
var xStack: Stack<Double> = Stack<Double>()
var xBST: BinarySearchTree<Int> = BinarySearchTree<Int>()
var xQueue: Queue<Float> = Queue<Float>()
var xLinkedList: LinkedList<Double> = LinkedList<Double>()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
To run the example project, clone the repo, and run swift build && swift test
from the project directory.
- iOS 12.0
- Swift 5.3
CoreDataStructures is available through github.
git clone https://github.com/michaelcordero/CoreDataStructures
swift build
swift test
Michael Cordero, michaelpetercordero@gmail.com
CoreDataStructures is available under the MIT license. See the LICENSE file for more info.