introduction.html
来自「Data Structure Ebook」· HTML 代码 · 共 128 行
HTML
128 行
<HTML><HEAD>
<TITLE>Data Structures and Algorithms: Introduction</TITLE>
<META name="description" content="Data Structures and Algorithms Course Notes,
PLDS210 University of Western Australia">
<META name="keywords" content="data structures,algorithms,abstract data types ">
</HEAD>
<BODY BGCOLOR="#ffffff">
<TABLE BGCOLOR="#00c0f0" WIDTH="100%" CELLSPACING=0 CELLPADDING=0>
<TR BGCOLOR="#00f0f0"><TD ALIGN=right>
<FONT FACE=helvetica SIZE=+1><I>Data Structures and Algorithms</I></FONT>
</TD></TR>
<A NAME=Introduction>
<TR><TD><FONT FACE=helvetica SIZE=+2><B>1. Introduction</B></FONT>
</TD></TR>
</TABLE>
<P>
This course is designed to teach you how to program efficiently.
It assumes that
<UL>
<LI>you know the basics of programming in C,
<LI>can write, debug and run simple programs in C, and
<LI>have some simple understanding of object-oriented design.
</UL>
An introduction to object-oriented programming using ANSI
standard C may be found in the companion
<A HREF="javascript:if(confirm('http://www.ee.uwa.edu.au/Year1/CLP110/CLP_ToC.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ee.uwa.edu.au/Year1/CLP110/CLP_ToC.html'" tppabs="http://www.ee.uwa.edu.au/Year1/CLP110/CLP_ToC.html">Object First</A>
course.
<P>
<H3>Good Programs</H3>
<TABLE CELLPADDING=0>
<TR>
<TD WIDTH="50%">There are a number of facets to good programs: they must
<OL TYPE=a>
<LI> run correctly
<LI> run efficiently
<LI> be easy to read and understand
<LI> be easy to debug <i>and</i>
<LI> be easy to modify.
</OL></TD>
<TD>
<TABLE BORDER=4 CELLPADDING=6>
<TR><TD BGCOLOR=yellow>
<I>What does <FONT COLOR="#fa0000"><B>correct</B></FONT> mean?</I><P>
We need to have some formal notion of the meaning of correct:
thus we define it to mean
<TABLE CELLPADDING=6>
<TR><TD>
"run in accordance with the specifications".
</TD></TR></TABLE>
</TD></TR></TABLE>
</TD></TR>
</TABLE>
<TABLE CELLPADDING=0>
<TR>
<TD WIDTH="100%">
The first of these is obvious - programs which don't run correctly
are clearly of little use. "Efficiently"
is usually understood to mean in the minimum time - but occasionally there will
be other constraints, such as memory use, which will be paramount. As will be
demonstrated later, better running times will generally be obtained from use of
the most appropriate data structures and
<FONT COLOR="#fa0000"><B>algorithms</B></FONT>, rather than through "hacking", i.e.
removing a few statements by some <a href="softeng.html#clever" tppabs="http://www.ee.uwa.edu.au/~plsd210/ds/softeng.html#clever">clever coding</a> -
or even worse, programming in assembler!
<P>
This course will focus on solving problems efficiently:
you will be introduced to a number of fundamental data structures
and algorithms (or procedures) for manipulating them.
</TD>
</TR>
</TABLE>
<P>
The importance of the other points is
less obvious.
The early history of many computer installations is, however,
testimony to their importance.
Many studies have quantified the enormous costs
of failing to build software systems that had all the characteristics listed.
(A classic reference is <a href="softeng.html#boehm" tppabs="http://www.ee.uwa.edu.au/~plsd210/ds/softeng.html#boehm">Boehm's text</a>.)
Unfortunately, much recent evidence suggests that these principles are still
not well understood!
Any perusal of <a href="softeng.html#risks" tppabs="http://www.ee.uwa.edu.au/~plsd210/ds/softeng.html#risks">Risks</a> forum will soon
convince you that there is an enormous amount of poor software in use.
The discipline of <a href="softeng.html#discipline" tppabs="http://www.ee.uwa.edu.au/~plsd210/ds/softeng.html#discipline"><i>software engineering</i></a>
is concerned with building large software systems which perform as their users
expected, are reliable and easy to maintain.
This course will introduce some
software engineering principles but we will concentrate on the creation of
small programs only.
By using well-known, efficient techniques for solving problems,
not only do you produce correct and fast programs in the minimum
time,
but you make your programs easier to modify.
Another software engineer will find it much simpler to work with
a well-known solution than something that has been hacked together
and "looks a bit like" some textbook algorithm.
<P>
<TABLE WIDTH="100%" BGCOLOR="#00f0ff">
<TR><TD><H3>Key terms</H3></TD></TR></TABLE>
<DL>
<DT><FONT COLOR="#fa0000"><B>correct</B></FONT>
<DD>A correct program runs in accordance with its specifications
<DT><FONT COLOR="#fa0000"><B>algorithm</B></FONT>
<DD>A precisely specified procedure for solving a problem.
</DL>
<P>
<TABLE CELLPADDING=5 WIDTH="100%" BGCOLOR="#00f0f0" CELLSPACING=0>
<TR><TD WIDTH="50%">
<FONT FACE=arial,helvetica>Continue on to <a href="strategies.html" tppabs="http://www.ee.uwa.edu.au/~plsd210/ds/strategies.html">Programming Strategies</a><br>
</TD>
<TD>
<FONT FACE=arial,helvetica>Back to the <A HREF="ds_ToC.html" tppabs="http://www.ee.uwa.edu.au/~plsd210/ds/ds_ToC.html">Table of Contents</A>
</TD></TR></TABLE>
<SMALL>
© <A HREF=mailto:morris@ee.uwa.edu.au>John Morris</A>, 1998
</SMALL>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?