计算机问题求解 数据组织能力 算法设计能力 马骏 majun@nju.edu.cn
计算机问题求解 数据组织能力 算法设计能力 马骏 majun@nju.edu.cn
程序= Algorithms+ 数据结构+算法 Dafa Structures= Programs 数据与数据 解决特定问 之间的逻辑 题的步骤和 Niklaus Wirth 关系 方法 1984年图灵奖得主 Pascal之父" 多个编程语言的主设计师: 算法的操作对象是数据结构 Algol W Modula Pascal Modula-2 Oberon 数据结构是算法设计的基础
程序= 数据结构+算法 数据与数据 之间的逻辑 关系 解决特定问 题的步骤和 Niklaus Wirth 方法 • 1984年图灵奖得主 • “Pascal之父” • 多个编程语言的主设计师: • Algol W Modula Pascal Modula-2 Oberon 算法的操作对象是数据结构 数据结构是算法设计的基础
我们再来理解以下文字 What we are interested in are the ways algorithms can organize, remember,change,and access collections of data. While control structures serve to tell the processor where it should be going,data structures,and the operations upon them, organize the data items in ways that enable it to do whatever it should do when it gets there. 从理解数据结构的“结构”角度出发,哪些词最为关键?
我们再来理解以下文字 从理解数据结构的“结构”角度出发,哪些词最为关键? What we are interested in are the ways algorithms can organize, remember, change, and access collections of data. While control structures serve to tell the processor where it should be going, data structures, and the operations upon them, organize the data items in ways that enable it to do whatever it should do when it gets there
抽象数据类型ADT一以栈为例 Out Out (LIFO)lists.Roughly,a stack is a set of objects which arrive at different points in time and are added to the set.When elements are deleted from the set, the object which was inserted last is removed first. A stack can be visualised as a pile of objects where objects can be added to or removed from the pile only from the top (see figure 2.3).In abstract terms,a Figure 2.3 Pictorial model of a stack
抽象数据类型ADT——以栈为例
栈的实现 单e●0● n s一-·T形 last Figure 3.2 Pointer representation of a stack S. Figure 2.6 Array implementation of stacks. 难道我们就定义了两个不同的stack了吗?
栈的实现 难道我们就定义了两个不同的stack了吗?