Update the applications of deque.

This commit is contained in:
krahets
2023-03-12 02:45:10 +08:00
parent b7fa3bbe86
commit bbef87ccfe
3 changed files with 34 additions and 28 deletions

View File

@ -40,7 +40,7 @@ class MyList:
""" 尾部添加元素 """
# 元素数量超出容量时,触发扩容机制
if self.size() == self.capacity():
self.extend_capacity();
self.extend_capacity()
self.__nums[self.__size] = num
self.__size += 1