Sorting: There is a series of data in random order, we sort them depending a certain key word Datalist: an finity set of data waiting to be sorted Key: data object has many attribute areas, namely there are many data element, one of all these elements can be used to distinguish object, we use it as sorting key. we also call it sorting code
chapter 9 GRAPH ALGORITHMs $I Definitions e G(V,E) where G: =graph, V=V(G): :=finite nonempty set of vertices, andE=E(G): : = finite set of edges. d' Undirected graph:(V;,vi)=(j,vi): =the same edge 6 Directed graph(digraph): :=2* I tailhead
CHAPTER 4 Stacks and Queues SI The stack adt 1. ADT A stack is a Last-In-First-Out(LIFO)list, that is. an ordered list in which insertions and deletions are made at the top only Objects: A finite ordered list with zero or more elements
(1) Input There are zero or more quantities that are externally supplied. (2) Output At least one quantity is produced. (3) Definiteness Each instruction is clear and unambiguous. (4) Finiteness If we trace out the instructions of an algorithm, then for all cases, the algorithm terminates after finite number of steps. (5) Effectiveness Every instruction must be basic enough to be carried out, in principle, by a person using only pencil and paper. It is not enough that each operation be definite as in(3); it also must be feasible