摘要: 第70题 难度:简单 题目爬楼梯 package _70爬楼梯; /* 方法三:动态规划算法不难发现,这个问题可以被分解为一些包含最优子结构的子问题,即它的最优解可以从其子问题的最优解来有效地构建,我们可以使用动态规划来解决这一问题。第 i 阶可以由以下两种方法得到: 在第 (i−1) 阶后向上爬一 阅读全文
posted @ 2020-04-04 18:19 zzx猪猪侠 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 04-树5 Root of AVL Tree (25分) An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node dif 阅读全文
posted @ 2020-03-13 17:40 zzx猪猪侠 阅读(711) 评论(0) 推荐(0) 编辑