Skip to content

Instantly share code, notes, and snippets.

@Abhishek9634
Created March 18, 2018 10:08
Show Gist options
  • Save Abhishek9634/144287392131a0252429b30d35825fd7 to your computer and use it in GitHub Desktop.
Save Abhishek9634/144287392131a0252429b30d35825fd7 to your computer and use it in GitHub Desktop.
let obj = Stack<String>()
obj.push(item: "A")
obj.push(item: "B")
obj.push(item: "C")
obj.push(item: "D")
obj.push(item: "E")
print("STACK COUNT: \(obj.count)")
print(obj.description)
let _ = obj.pop()
print(obj.description)
let _ = obj.pop()
print("STACK COUNT: \(obj.count)")
print(obj.description)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment