2019年12月6日
摘要: 1.已知两个序链表建树 先序中序建树 PAT 1086 node *buildTree(vector<int>pre,vector<int>in,int pl,int pr,int il,int ir){ if(pl>pr || il>ir) return NULL; int pos=-1; for 阅读全文
posted @ 2019-12-06 15:40 蔡军帅 阅读(269) 评论(0) 推荐(0)
摘要: 1.已知两个序链表建树先序中序建树PAT 1086node *buildTree(vectorpre,vectorin,int pl,int pr,int il,int ir){ if(pl>pr || i... 阅读全文
posted @ 2019-12-06 15:40 蔡军帅 阅读(95) 评论(0) 推荐(0)
摘要: 1020 Tree Traversals (25分) Suppose that all the keys in a binary tree are distinct positive integers. Give... 阅读全文
posted @ 2019-12-06 15:26 蔡军帅 阅读(90) 评论(0) 推荐(0)
摘要: 1020 Tree Traversals (25分) Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequen 阅读全文
posted @ 2019-12-06 15:26 蔡军帅 阅读(289) 评论(0) 推荐(0)
摘要: 1086 Tree Traversals Again (25分) An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that wh 阅读全文
posted @ 2019-12-06 14:26 蔡军帅 阅读(411) 评论(0) 推荐(0)
摘要: 1086 Tree Traversals Again (25分) An inorder binary tree traversal can be implemented in a non-recursive wa... 阅读全文
posted @ 2019-12-06 14:26 蔡军帅 阅读(90) 评论(0) 推荐(0)