→ fatrabitree: 就是純練習 12/22 03:03
※ 編輯: Jruffian (1.171.146.193), 12/22/2015 03:15:48
→ fatrabitree: 基礎先打一下再去刷leetcode,至少資結跟演算法要看 12/22 03:27
→ fatrabitree: 這樣至少會做easy 其他就靠經驗 12/22 03:28
→ Jruffian: 謝謝F大的意見 12/22 04:07
→ testPtt: 要out的時候放到另一個stack再放回去準備in 12/22 08:15
→ testPtt: 通常做這種無聊事很偏硬體 可能是記憶體不配位址之類的 12/22 08:22
推 andrenvq57: push all elements into s1, while s1 not empty: pop 12/22 14:31
→ andrenvq57: s1, push into s2 這樣就反過來了 12/22 14:32
→ andrenvq57: pop queue: pop s2. push queue: pop all from s2, pu 12/22 14:35
→ andrenvq57: sh all to s1, push new element to s1, pop all from 12/22 14:35
→ andrenvq57: s1, push all to s2 12/22 14:35
→ HolyBugTw: 兩個杯子倒來倒去,人生能用上的話就有用(用的上嗎?) 12/22 15:35
推 stupid0319: 用多個Stack來做Queue也是很常見啊,但不是刻意就是了 12/22 17:39