摘要: Next, Suppose we would like to invent a new ADT called MedianFinder which is a collection of integers and supports finding the median of the collectio 阅读全文
posted @ 2023-05-15 21:49 哎呦_不想学习哟~ 阅读(46) 评论(0) 推荐(0)
摘要: /* Represent a list of stuff, where all the "list" work is delegated * to a naked recursive data structure. */ public class SLList<Blorp> implements L 阅读全文
posted @ 2023-05-15 17:29 哎呦_不想学习哟~ 阅读(30) 评论(0) 推荐(0)
摘要: 1 import java.util.ArrayList; 2 import java.util.List; 3 4 public class ArrayMap<K, V> { 5 private List<K> keys; 6 private List<V> values; 7 8 public 阅读全文
posted @ 2023-05-15 16:58 哎呦_不想学习哟~ 阅读(37) 评论(0) 推荐(0)
摘要: 题目描述 1 import static org.junit.Assert.*; 2 import org.junit.Test; 3 4 public class TestArrayDequeGold { 5 @Test 6 public void testStudentArrayDeque() 阅读全文
posted @ 2023-05-13 16:09 哎呦_不想学习哟~ 阅读(25) 评论(0) 推荐(0)
摘要: 解答 这告诉我们,将一个类实例化对象作为参数代入一个函数中,这个参数的类型是取决于这个类的静态作用域,而不是动态作用域,但是在调用方法时,如果实例化对象有相应的方法,那么就会调用动态作用域的方法。即文中的Corgi.的方法。 阅读全文
posted @ 2023-05-13 16:08 哎呦_不想学习哟~ 阅读(19) 评论(0) 推荐(0)
摘要: 1 public class Horse { 2 Horse same; 3 String jimmy; 4 5 public Horse(String lee) { 6 jimmy = lee; 7 } 8 9 public Horse same(Horse horse) { 10 if (sam 阅读全文
posted @ 2023-05-07 16:16 哎呦_不想学习哟~ 阅读(20) 评论(0) 推荐(0)
摘要: 1.Golden Rule of Equals For primitives, the line int y = x copies the bits inside the x box into the y box. For reference types, we do the exact same 阅读全文
posted @ 2023-05-05 10:24 哎呦_不想学习哟~ 阅读(194) 评论(0) 推荐(0)
摘要: 怎么说呢,这个环境配置花了我几乎一天的时间(呜呜呜呜,我是傻逼),ok,现在我就来分享一下我遇到的坑,和排解方法。 这篇随笔分为两个部分,第一个就是关于git仓库的创建,为后面的grade做准备;第二个就是intellij的配置。 第一部分 1.首先是创建/选择一个目录 我的电脑是macbook,我 阅读全文
posted @ 2023-05-05 01:10 哎呦_不想学习哟~ 阅读(2492) 评论(0) 推荐(1)
摘要: 题目描述: dcatenate(IntList A, IntList B):返回一个由A的所有元素组成的列表,后面是B的所有元素。可能会修改A。Don't use 'new'。 public static IntList dcatenate(IntList A, IntList B) { if(A 阅读全文
posted @ 2023-05-04 19:31 哎呦_不想学习哟~ 阅读(130) 评论(0) 推荐(0)
摘要: 内容参照 相关阅读推荐 首先是递归获得阶乘的例子 (define f (lambda (x) (cond ((= x 1) 1) (else (* x (f (- x 1))))))) 对应的lambda (f): (lambda (f) (lambda (x) (cond ((= x 1) 1) 阅读全文
posted @ 2023-04-27 15:34 哎呦_不想学习哟~ 阅读(27) 评论(0) 推荐(0)