摘要:
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You may not modify the values in the list's nodes, only nodes its 阅读全文
摘要:
Given a binary tree, return the preorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iterativel 阅读全文
摘要:
Given a binary tree, return the postorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iterative 阅读全文