Kodeco Forums

Swift Algorithm Club: Swift Stack Data Structure

Learn how to implement a Swift stack, including push, peek, and pop, and using Generics.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/800-swift-algorithm-club-swift-stack-data-structure
1 Like

Nice tutorial, thanks! Implementing a stack was an actual question that I had on a past job interview.

1 Like

It is very important for new programmers! (like me)
but, please change code from github on swift3!?
//here code β€œGitHub - raywenderlich/swift-algorithm-club: Algorithms and data structures in Swift, with explanations!”
swift 3 is crying!

@slgraff Thanks, I’m glad you liked it!

@pixcell For now, avoid opening the swift-algorithm-club.xcworkspace file. We’re still migrating some algorithms over from Swift 2.1 to 3.

Open the playgrounds from the respective algorithm folders. You can see which ones have already been migrated here: https://github.com/raywenderlich/swift-algorithm-club/issues/181

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]