随笔分类 -  算法

关于算法的学习笔记
摘要:105. 从前序与中序遍历序列构造二叉树 题目 难度中等534 根据一棵树的前序遍历与中序遍历构造二叉树。 注意: 你可以假设树中没有重复的元素。 例如,给出 前序遍历 preorder = [3,9,20,15,7] 中序遍历 inorder = [9,3,15,20,7] 返回如下的二叉树: 3 阅读全文
posted @ 2020-06-17 12:02 不继 阅读(187) 评论(0) 推荐(0)
摘要:1001 A+B Format (20 分) Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (un 阅读全文
posted @ 2019-09-21 09:35 不继 阅读(270) 评论(0) 推荐(0)