Skip to content

Instantly share code, notes, and snippets.

@DustinAlandzes
Created March 6, 2019 02:53
Show Gist options
  • Save DustinAlandzes/214bd5b7ff68b98ef85f2075e482b6dd to your computer and use it in GitHub Desktop.
Save DustinAlandzes/214bd5b7ff68b98ef85f2075e482b6dd to your computer and use it in GitHub Desktop.
class Queue:
def __init__(self):
self.items = []
def isEmpty(self):
return self.items == []
def enqueue(self, item):
self.items.insert(0,item)
def dequeue(self):
return self.items.pop()
def size(self):
return len(self.items)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment