摘要:
例如: list 1 3 5 7 9 2 4 6 8 level[20] 20层 1. level[0] 1 2. level[0] NULL level[1] 1 3 3 level[0] 5 level[1] 1 3 4 level[0] NULL level[1] NULL level[2] 阅读全文
摘要:
原题链接:https://leetcode.com/problems/lru-cache/#/description 阅读全文
摘要:
class Solution { public: vector postorderTraversal(TreeNode* root) { vector vec; travel(root, vec); return vec; } //后序遍历 void travel(TreeNode* root, vector& v) { if (root == NULL)r... 阅读全文
摘要:
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For 阅读全文