摘要: //JS版本的代码var buildTree = function(inorder, postorder) { let post_idx; const idx_map = new Map(); const helper = (in_left, in_right) => { // 如果这里没有节点构造 阅读全文
posted @ 2021-05-06 18:03 KYSpring 阅读(34) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : 阅读全文
posted @ 2021-05-06 17:00 KYSpring 阅读(29) 评论(0) 推荐(0) 编辑