查看: 7925| 回复: 40
跳转到指定楼层
上一主题 下一主题
收起左侧

[Coursera] Algorithms (princeton) (week2) 讨论帖

全局:
公开课
学校名称: princeton
Unit号: 2
开课时间: 2014-01-31
课程全名: Algorithms
平台: Coursera

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
本帖最后由 sanguine 于 2014-3-19 17:06 编辑

Honor code.   All students in the course must agree to abide by the Coursera honor code. In particular, do not post solutions or partial solutions to programming assignments; however, you are permitted to discuss general ideas and problem-solving approaches. You are also permitted to discuss solutions to exercises and job interview questions.
assignments不可以share code,但是exercise和job interview questions是可以的

讨论帖(该贴仅为week2讨论帖,加分贴请点这里)

课程汇总 && 介绍:http://www.1point3acres.com/bbs/thread-78774-1-1.html

Schedule:

Each Friday at 12:01pm EDT, we will release the course materials for the week: two lectures, two sets of exercises, a programming assignment, and two sets of job interview questions.


  • Exercises: due two weeks after they are released.
  • Programming assignments: due two weeks after they are released.
  • Job interview questions: for your own enrichment and not assessed.

Week 2

You may be familiar with several of the algorithms and data structures that we consider this week, but perhaps not with our approach to data abstraction and Java language mechanisms for implementing them, so it's worthwhile to pay close attention. In the week's first lecture, we consider robust implementations for stacks and queues. In the week's second lecture, we begin our study of sorting algorithms. In both cases, we consider applications that illustrate the efficacy of careful modular programming when implementing algorithms.

Lecture: Stacks and Queues. We consider two fundamental data types for storing collections of objects: the stack and the queue. We implement each using either a singly-linked list or a resizing array. We introduce two advanced Java features—generics and iterators—that simplify client code. Finally, we consider various applications of stacks and queues ranging from parsing arithmetic expressions to simulating queueing systems.

Lecture: Elementary Sorts. We introduce the sorting problem and Java's Comparable interface. We study two elementary sorting methods (selection sort and insertion sort) and a variation of one of them (shellsort). We also consider two algorithms for uniformly shuffling an array. We conclude with an application of sorting to computing the convex hull via the Graham scan algorithm.

Exercises. Drill exercises on the lecture material.

Programming Assignment: Deques and Randomized Queues. Your programming assignment will involve developing implementations of two conceptually simple "collection" data types—the deque and the randomized queue---which are quite useful in practice. Properly implementing these data types will require using a linked data structure for one and a resizing array for the other.

Job Interview Questions. Algorithmic interview questions based on the lecture material.

Suggested readings. Section 1.3 and 2.1 in Algorithms, 4th edition.





上一篇:[Coursera] Algorithms (princeton) (week2) 加分贴
下一篇:[stanford]Introduction to databases Midterm加分&讨论帖
🔗
nibuxing 2014-2-11 10:22:35 | 只看该作者
全局:
Lecture的Stacks(16:24)第14分钟S[N++]=item;  return s[--N];
s[N++]和s[--N]第一次见到,这语句是什么意思啊。
回复

使用道具 举报

🔗
ifso 2014-2-11 10:46:01 | 只看该作者
全局:
nibuxing 发表于 2014-2-10 21:22
Lecture的Stacks(16:24)第14分钟S[N++]=item;  return s[--N];
s[N++]和s[--N]第一次见到,这语句是什么 ...

S[N++] = item; assign the value of item to S[N], then N = N + 1.
return S[--N]; N = N - 1, then return S[N].
回复

使用道具 举报

🔗
jby1797 2014-2-11 11:11:03 | 只看该作者
全局:
唉,这个老教授讲话吞吞吐吐的,本来听力就不好,感觉听起来费劲啊。不知道大家是否有同感

点评

当时上雅思课,老师明确说,讲话只要有一个啊,饿,就要扣分。感情native speaker 也这样啊  发表于 2014-2-11 16:10
回复

使用道具 举报

🔗
nibuxing 2014-2-11 11:32:15 | 只看该作者
全局:
rsun 发表于 2014-2-11 11:11
唉,这个老教授讲话吞吞吐吐的,本来听力就不好,感觉听起来费劲啊。不知道大家是否有同感

上学校数据库课的时候,听着印度老师的云里雾里,默默地打开了Algorithms的lecture。
话说我倒很喜欢他这种吞吞吐吐啊,感觉很有节奏,能基本听懂,觉得是MOOCs里面比较好的一个了。
不过有时候人家能听懂的老师我会听不懂,我觉得我这人控发音。说不定你比较控节奏。
回复

使用道具 举报

🔗
 楼主| sanguine 2014-2-11 11:34:24 | 只看该作者
全局:
rsun 发表于 2014-2-11 11:11
唉,这个老教授讲话吞吞吐吐的,本来听力就不好,感觉听起来费劲啊。不知道大家是否有同感

+1==配了字幕学习
回复

使用道具 举报

🔗
nibuxing 2014-2-11 11:34:29 | 只看该作者
全局:
ifso 发表于 2014-2-11 10:46
S[N++] = item; assign the value of item to S[N], then N = N + 1.
return S[--N]; N = N - 1, then r ...

懂了,感谢回答!继续看了。
回复

使用道具 举报

🔗
jby1797 2014-2-11 11:41:26 | 只看该作者
全局:
nibuxing 发表于 2014-2-11 11:32
上学校数据库课的时候,听着印度老师的云里雾里,默默地打开了Algorithms的lecture。
话说我倒很喜欢他这 ...

我是听惯了大S,CS106A的Mehran Sahami那水银泻地的课堂。
太完美了,从头到尾没有一个停顿
回复

使用道具 举报

🔗
nibuxing 2014-2-11 11:45:46 | 只看该作者
全局:
rsun 发表于 2014-2-11 11:41
我是听惯了大S,CS106A的Mehran Sahami那水银泻地的课堂。
太完美了,从头到尾没有一个停顿

不谈了,那课无数个赞,经典的入门课。
回复

使用道具 举报

🔗
ifso 2014-2-11 12:45:26 | 只看该作者
全局:
rsun 发表于 2014-2-10 22:41
我是听惯了大S,CS106A的Mehran Sahami那水银泻地的课堂。
太完美了,从头到尾没有一个停顿

106A那老师太屌了…语速快,发音清楚。(特别喜欢用funky这词)
这边这老教授不知道是不喜欢面对摄像机还是怎么的-。-
回复

使用道具 举报

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

本版积分规则

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