You are viewing a single comment's thread. Return to all comments →
IMO these challanges are getting easier every week. *Pyhon code: *
def __init__(self): self.queue = [] self.stack = [] def pushCharacter(self, char): self.stack.append(char) def enqueueCharacter(self, char): self.queue.append(char) def popCharacter(self): return self.stack.pop(-1) def dequeueCharacter(self): return self.queue.pop(0)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 18: Queues and Stacks
You are viewing a single comment's thread. Return to all comments →
IMO these challanges are getting easier every week. *Pyhon code: *