src/PyDS/Queue/Queue.py
def __resize(self, capacity: int) -> None:
        """Resize queue with twice the capacity"""
        list_ = [None] * capacity
        front = self.__front

        for i in range(self.__size):
            list_[i] = self.__list[front]
            front = (front + 1) % self.__capacity

        self.__front = 0
        self.__list = list_
        self.__capacity = capacity
Resize queue with twice the capacity
Resize queue with twice the capacity
Resize queue with twice the capacity
def __resize(self, capacity: int) -> None:
        list_ = [None] * capacity
        front = self.__front
        for i in range(self.__size):
            list_[i] = self.__list[front]
            front = (front + 1) % self.__capacity
        self.__front = 0
        self.__list = list_
        self.__capacity = capacity
def __resize ( self , capacity : int ) -> None : list_ = [ None ] * capacity front = self . __front for i in range ( self . __size ) : list_ [ i ] = self . __list [ front ] front = ( front + 1 ) % self . __capacity self . __front = 0 self . __list = list_ self . __capacity = capacity
Resize queue with twice the capacity
Resize queue with twice the capacity
"""Resize queue with twice the capacity"""
self
capacity
int