楼主: jaly50
跳转到指定楼层
上一主题 下一主题
收起左侧

Berkeley CS 61B Data Structures(in Java) Homework4 加分+讨论帖

 
🔗
闲的时光 2016-11-19 10:42:25 | 只看该作者
全局:
传不了图片
1.
Now we are testing DList.
Here is a list after insertBack 6, 9, 12: [  6  9  12  ]

Here is the same list after insertBack(15) and insertFront(3): [  3  6  9  12  15  ]

front() should be 3. It is: 3
front's next should be 6. It is: 6
front's next's prev should be 3. It is: 3
After remove the front, the front() should be 6. It is: 6
After insertBefore() and insertAfter(), The first 3 nodes should be 5,6,8. The list is: [  5  6  8  9  12  15  ]

Here is a list after construction: [  ]
isEmpty() should be true. It is: true
length() should be 0. It is: 0
Here is a list after insertFront(3) to an empty list: [  3  ]
Here is a list after insertBack(5) on an empty list: [  5  ]

Here is a list after insertFront 3, 2, 1: [  1  2  3  ]
isEmpty() should be false. It is: false
length() should be 3. It is: 3
Here is the same list after insertBack(4): [  1  2  3  4  ]

Here is a list after insertBack 6, 7: [  6  7  ]
isEmpty() should be false. It is: false
length() should be 2. It is: 2
Here is the same list after insertFront(5): [  5  6  7  ]

2.
Now we are testing LockDList.
Here is a list after insertBack 6, 9, 12: [  6  9  12  ]

Here is the same list after insertBack(15) and insertFront(3): [  3  6  9  12  15  ]

front() should be 3. It is: 3
front's next should be 6. It is: 6
front's next's prev should be 3. It is: 3
We lockNode front()= 3
After remove the locked front, the front() should still be 3. It is: 3
After remove the back, the back() should be 12. It is: 12
After insertBefore(3) and insertAfter(3), The first 3 nodes should be 5,3,8. The list is: [  5  3  8  6  9  12  ]

Here is a list after construction: [  ]
isEmpty() should be true. It is: true
length() should be 0. It is: 0
Here is a list after insertFront(3) to an empty list: [  3  ]
Here is a list after insertBack(5) on an empty list: [  5  ]

Here is a list after insertFront 3, 2, 1: [  1  2  3  ]
isEmpty() should be false. It is: false
length() should be 3. It is: 3
Here is the same list after insertBack(4): [  1  2  3  4  ]

Here is a list after insertBack 6, 7: [  6  7  ]
isEmpty() should be false. It is: false
length() should be 2. It is: 2
Here is the same list after insertFront(5): [  5  6  7  ]

评分

参与人数 1学分 +1 收起 理由
yingy4 + 1

查看全部评分

回复

使用道具 举报

🔗
duruin 2016-11-20 09:56:31 | 只看该作者
全局:
感谢大神提供的tester

评分

参与人数 1学分 +1 收起 理由
yingy4 + 1

查看全部评分

回复

使用道具 举报

🔗
Mr.Zhang 2016-11-27 11:59:27 | 只看该作者
全局:
打卡交作业,感谢楼主提供的test资源
更多图片 小图 大图
组图打开中,请稍候......

评分

参与人数 1学分 +1 收起 理由
yingy4 + 1

查看全部评分

回复

使用道具 举报

🔗
gaobin1019 2016-12-20 10:36:45 | 只看该作者
全局:
请教下part2 要怎么call才能violate invariant啊?感觉怎么都不行啊- -
回复

使用道具 举报

🔗
wzhbtbt 2016-12-25 15:24:18 | 只看该作者
全局:
感谢提供的测试代码。看了首页的前辈解答增长了很多知识,谢谢了。
更多图片 小图 大图
组图打开中,请稍候......

评分

参与人数 1学分 +1 收起 理由
yingy4 + 1

查看全部评分

回复

使用道具 举报

🔗
dj940211 2017-1-1 02:36:40 | 只看该作者
全局:
好几天没好好学习了!!!到Exception那块就听不进去。。但是2016年的最后一天还是要装模作样的学学习来圆满结束这一年,谢谢楼主提供的test code!
出国后尽管学习很紧张,大多都是独自一个人,但真真正正让我开始思考人生,开始用更乐观、更包容的心态面对一切。
总之,新的一年,好好锻炼,好好吃饭,努力进步。希望可以看更美的风景,遇到更有趣的人,成为更好的自己。
新年快乐~~
更多图片 小图 大图
组图打开中,请稍候......

评分

参与人数 1学分 +1 收起 理由
啊lch + 1 坚持的不错,再接再厉!

查看全部评分

回复

使用道具 举报

🔗
csssssss 2017-1-2 17:30:18 | 只看该作者
全局:
就上传有Lock的图吧,十分感谢第一条回复,看完了对多态的理解好了很多

5LR7E2BG_M@)7I}E383B_E9.png (40.16 KB, 下载次数: 0)

5LR7E2BG_M@)7I}E383B_E9.png

评分

参与人数 1学分 +1 收起 理由
啊lch + 1 坚持的不错,再接再厉!

查看全部评分

回复

使用道具 举报

🔗
cxw111 2017-1-2 20:09:07 | 只看该作者
全局:

评分

参与人数 1学分 +1 收起 理由
啊lch + 1 坚持的不错,再接再厉!

查看全部评分

回复

使用道具 举报

🔗
sophiechan 2017-1-5 13:41:53 | 只看该作者
全局:
做完对继承理解了一些。
更多图片 小图 大图
组图打开中,请稍候......

评分

参与人数 1学分 +1 收起 理由
啊lch + 1 坚持的不错,再接再厉!

查看全部评分

回复

使用道具 举报

🔗
纳兰春江 2017-1-5 15:15:15 | 只看该作者
全局:
我也是一开始轻视这次的作业了,一直做到partIII, 才发现原来要把继承搞清楚才可以。
这次作业用时比预料的长,特别是子类的field需不需要重写覆盖掉父类的,需要好好的理解。
结果发现我男神已经为我们想好了最佳方案了,只要重写一个小小的方法就可以了。从心里又膜拜了一把。

我用了自己写的测试数据

评分

参与人数 1学分 +1 收起 理由
啊lch + 1 坚持的不错,再接再厉!

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表