![]() * fix: linkedlist_stack.py 中的peek方法需要判空raise Error 栈空的时候不能再 peek() 。另外由于 pop() 复用了 peek() ,栈空时返回的 None 会传递到 pop() 中的 num ,导致后续的继续执行 self.peek.next 报错等后续问题 * Update linkedlist_stack.py * Update linkedlist_queue.py * Update linkedlist_deque.py --------- Co-authored-by: Yudong Jin <krahets@163.com> |
||
---|---|---|
.. | ||
array_deque.py | ||
array_queue.py | ||
array_stack.py | ||
deque.py | ||
linkedlist_deque.py | ||
linkedlist_queue.py | ||
linkedlist_stack.py | ||
queue.py | ||
stack.py |