mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-06 14:27:26 +08:00
Update the applications of deque.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user