diff --git a/codes/python/chapter_stack_and_queue/linkedlist_stack.py b/codes/python/chapter_stack_and_queue/linkedlist_stack.py index 8802947..19ffdc3 100644 --- a/codes/python/chapter_stack_and_queue/linkedlist_stack.py +++ b/codes/python/chapter_stack_and_queue/linkedlist_stack.py @@ -52,7 +52,7 @@ class LinkedListStack: while temp: stack.append(temp.val) temp = temp.next - stack = stack[::-1] + stack.reverse() return stack