摘要: 尤其注意:append,+,extend的区别 Method/Function Description Example Input Resulting List/Output append(x) Adds a single element x to the end of the list. [1, 阅读全文
posted @ 2025-01-04 16:02 yama_lei 阅读(5) 评论(0) 推荐(0)
摘要: The Tree class is defined as below. class Tree: """ >>> t = Tree(3, [Tree(2, [Tree(5)]), Tree(4)]) >>> t.label 3 >>> t.branches[0].label 2 >>> t.branc 阅读全文
posted @ 2025-01-01 09:51 yama_lei 阅读(9) 评论(0) 推荐(0)
摘要: the provided structure of link class Link: """A linked list. >>> s = Link(1) >>> s.first 1 >>> s.rest is Link.empty True >>> s = Link(2, Link(3, Link( 阅读全文
posted @ 2024-12-31 19:45 yama_lei 阅读(15) 评论(0) 推荐(0)
摘要: !!!考前注意: 注意不要破坏抽象:比如scheme list要用对应的constructor和selector不要用car,cons 注意在继承的时候,能调用super().method就尽量调用 注意是list of lists 还是list! 降序排列是DESC,升序不用写 如果是print 阅读全文
posted @ 2024-12-31 16:57 yama_lei 阅读(12) 评论(0) 推荐(0)
摘要: 期末复习因为没有往年卷做现在闲得无聊导致的🤓 下面是几种不一样的二维数组的定义方式: 1 typedef int A[10];A p[10]; 2 int** q=new int*[10]; for(int i=0;i<10;i++){q[i]=new int[10];}; 3 int a[10] 阅读全文
posted @ 2024-12-27 20:53 yama_lei 阅读(14) 评论(0) 推荐(0)
摘要: 引言:樾哥在最后一节课上,把SQL的最后一点语法讲完了;短暂休息了几分钟后,把他带来的圣诞节礼物--巧克力,分给了学生,开始了下面这段讲话。 (暂未人工校对,有许多的错误) 樾哥: 当老师有这样的一个好处:当你一直在观察学生的时候,你会发现历史总是惊人的相似:每一届学生的烦恼都是惊人的相似。 我可以 阅读全文
posted @ 2024-12-25 16:26 yama_lei 阅读(108) 评论(2) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; int main() { cout<<"hello world"<<endl; return 0; } 阅读全文
posted @ 2024-12-18 22:33 yama_lei 阅读(14) 评论(5) 推荐(0)