We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d48120 commit 5a0b4eeCopy full SHA for 5a0b4ee
reorder-list/jaejeong1.java
@@ -25,7 +25,7 @@ public void reorderList(ListNode head) {
25
// 풀이: 역순으로 저장할 스택에 node들을 넣고, 기존 node 1개/스택 node 1개씩 이어 붙인다
26
// 스택은 LIFO로 저장되기 때문에, 문제에서 요구하는 순서대로 reorderList를 만들 수 있다
27
// TC: O(N)
28
- // SC: O(2N)
+ // SC: O(N)
29
Stack<ListNode> stack = new Stack<>();
30
31
var curNode = head;
0 commit comments