# MIT《计算机科学与编程导论》第七讲

Section 1

mutable
L1 = [1, 2, 3]
L2 = L1
L1[0] = 4
print L2 -> [4, 2, 3]

immutable
a = 1
b = a
a = 2
print b - 1

Dictionaries 字典类型
-mutable
-not ordered
-generalized indexing

Section 2

Pseudocode 伪代码
1.Module
2.Data type
3.Flow of control
4.Abstraction

Efficency 效率

In general, it's hard to come up with the really clever algorithm.
What you're much better at doing is saying how do I take the problem I've got
and map it into a class of algorithm about which I know and use the efficiencies
of those to try and figure out how to make it work.
Another way of say it is, efficiency is really about choice of algorithm. And we want
to help you learn how to map a problem into a class of algorithm of some efficiency.

How do we think about effciency? Typically, there's two things we want to measure:
space & time.
When we talk about space, what we usually refer to is, how much computer memory
does it take to complete a computation of a particular size? And by that, I mean,
not how much memory do I need to store the size of the input. It's really how much
internal memory do I use up as I go through the computation?
In this course, we really focus on the time. What is the number of the basic steps
needed as a function of the input size?

（不应该运行程序看多久运行完。因为这钟运行时间会受到很多因素影响，如机器的配置，

We're going to assume a particular model, called a random access model.
Which basically says, we're going to assume that the length of time it takes me to
get to any location in memory is constant. And the second assumption we're going
to make is the basic primitive steps take constant time, same amount of time to compute.

（对于每种编程语言不全是这样，但这个模型不错。）

Random Access Model and 3 cases to analyze
- Best case
- Worst case
- Average case

#### mit 计算机科学及编程导论（1）

2014-10-02 01:31:27

#### mit 计算机科学及编程导论（14,15,16）

2012-08-10 11:02:31

#### MIT麻省理工学院公开课：计算机科学及编程导论 Python 笔记1-3

2015-05-18 14:40:24

#### mit 计算机科学及编程导论（10）

2012-07-28 13:37:07

#### MIT计算机科学集编程导论（二）

2016-09-13 17:40:53

#### MIT计算机科学及编程导论（Python）

2014年08月08日 5.45MB 下载

#### MIT 6.00.01X 计算机科学和Python编程导论 week1

2018-01-18 01:04:28

#### MIT 计算机科学和Python 编程导论

2016-09-27 16:36:15

#### 麻省理工学院公开课:<em>计算机科学及编程导论</em> 代码

2018年05月07日 0B 下载

#### 麻省理工学院公开课:<em>计算机科学及编程导论</em>_代码.

2018年05月08日 0B 下载