摘要: 网址 https://inst.eecs.berkeley.edu/~cs61a/fa21/disc/disc14/ #problem1: 就是两种情况考虑,然后加起来就好了 def paths(x, y): """Return a list of ways to reach y from x by 阅读全文
posted @ 2022-05-03 18:50 天然气之子 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 网址 https://inst.eecs.berkeley.edu/~cs61a/fa21/lab/lab14/ #problem1: 从上到下,每一次裁剪掉数值大的那个树枝 def prune_min(t): """Prune the tree mutatively. >>> t1 = Tree( 阅读全文
posted @ 2022-05-03 15:55 天然气之子 阅读(257) 评论(0) 推荐(0) 编辑