from src.datastructures.linkedlist.LinkedList import LinkedList


class Stack:

    def __init__(self):
        self.stack = LinkedList()

    def isEmpty(self):
        return self.stack.head == None

    def push(self, value):
        self.stack.prepend(value)

    def pop(self):
        removedItem = self.stack.deleteHead()
        if removedItem == None:
            return None
        return removedItem.value

    def peek(self):
        if self.isEmpty():
            return None
        return self.stack.head.value

3c658c653c31da65c651eea0423af1804521f534
<mask token>


class Stack:
    <mask token>

    def isEmpty(self):
        return self.stack.head == None

    def push(self, value):
        self.stack.prepend(value)
    <mask token>
    <mask token>

<mask token>


class Stack:

    def __init__(self):
        self.stack = LinkedList()

    def isEmpty(self):
        return self.stack.head == None

    def push(self, value):
        self.stack.prepend(value)

    def pop(self):
        removedItem = self.stack.deleteHead()
        if removedItem == None:
            return None
        return removedItem.value
    <mask token>

<mask token>


class Stack:

    def __init__(self):
        self.stack = LinkedList()

    def isEmpty(self):
        return self.stack.head == None

    def push(self, value):
        self.stack.prepend(value)

    def pop(self):
        removedItem = self.stack.deleteHead()
        if removedItem == None:
            return None
        return removedItem.value

    def peek(self):
        if self.isEmpty():
            return None
        return self.stack.head.value

from src.datastructures.linkedlist.LinkedList import LinkedList


class Stack:

    def __init__(self):
        self.stack = LinkedList()

    def isEmpty(self):
        return self.stack.head == None

    def push(self, value):
        self.stack.prepend(value)

    def pop(self):
        removedItem = self.stack.deleteHead()
        if removedItem == None:
            return None
        return removedItem.value

    def peek(self):
        if self.isEmpty():
            return None
        return self.stack.head.value
