(self)
expands size of the array.
         Time Complexity: O(n)
expands size of the array.
         Time Complexity: O(n)
expands size of the array . Time Complexity : O ( n )
def expand(self):
        """
         expands size of the array.
         Time Complexity: O(n)
        """
        new_array = [None] * len(self.array) * 2  # double the size of the array
        for i, element in enumerate(self.array):
            new_array[i] = element
        self.array = new_array
def expand ( self ) : new_array = [ None ] * len ( self . array ) * 2 # double the size of the array for i , element in enumerate ( self . array ) : new_array [ i ] = element self . array = new_array