Sie sind auf Seite 1von 12

Data Structures - CMP2006

Lecture One
By David W. White
dwwhite@utech.edu.jm
University of Technology, Jamaica
August 2015

Expected Outcome
At the end of this lecture, the student
should:

Have a general understanding of what will be


covered in this course
Explain the meaning and application of
abstract data types (ADTs)
Demonstrate an understanding of structured
data types

Introduction to the
Data Structures Course

This course draws heavily on concepts taught


in prerequisite the courses Programming II
(CMP1025) and Object Oriented Programming
(CIT2004)
Programming II dealt with structured
programming constructs, modularity,
iteration/recursion, arrays, structures, pointers
searching and sorting
OOP dealt with classes and objects, pointers
to objects, dynamic memory allocation and
deallocation, inheritance and polymorphism

Introduction to the
Data Structures Course

In this course we will also design and analyze


algorithms using pseudocode
Pseudocode was taught in Programming I
(CMP1024)

Introduction to the
Data Structures Course

This Data Structures (CMP2006) course teaches


students how to work with structured data types
to store, retrieve and manipulate data efficiently
Includes data structures such as arrays, linked
lists, stacks, queues and trees
Also includes operations such as inserting data,
deleting data, traversal, searching and sorting;
and complexity analysis of these
Uses both C++ and Java as implementation
language (students can choose either)

Assessment

Two lab tests worth 10% each

Two lecture tests worth 10% each

One group assignment (2 persons) worth 10%

A final exam worth 50%

Total course work = 50%, Final Exam = 50%

Textbooks and other resources

Recommended Textbooks
- Data Structures: A pseudocode approach with
C++
- C++ How to Program, Deitel and Deitel,
Pearson/Prentice Hall

Java How to Program, Deitel and Deitel,


Pearson/Prentice Hall
Recommended Websites
- Cprogramming.com
Short tutorials with examples, exercises and answers
http://www.cprogramming.com/algorithms-and-datastructures.html

Programming Language
and Compiler

Course will be taught using the Java and C++


Programming Languages
C++ Compiler used in labs Microsoft Visual
C++ Express 2012
Java Compiler used in labs Eclipse
Both of these compilers are available as free
downloads (from Microsoft Website and
Eclipse Foundation Website, or from UTech
Lab shared folders)

Why study data structures?

Having done Programming I and II, OOP and


possibly CLDD, you should by now be able to
analyze a problem, design the solution using
pseudocode and UML diagrams, and implement
your design in C++ or Java code
So you can write programs...
then why study data structures (yet another
programming course)?
Studying and mastering data structures allows
you to write programs more efficiently

Efficiency

Efficiency describes the how best use is made


of the resources at hand
In the study of data structures, we measure
efficiency in terms of time and space
How much space is required to store the data?
How much time is required to perform
operations on the data?
Later we will perform complexity analysis also
known as Big O analysis, to determine
efficiency of the data structures we will study

Space Efficiency

Suppose the United Nations wants to give each


person on the planet a unique personal
identification number
Can we use an integer data type to store the id?
Things to consider: how many persons are on
the planet? and What are the range of numbers
an integer can store?
Pros and Cons. Anybody remember Y2K?
Data types, their sizes, and ranges will be
explored in the first lab

Time Efficiency

Suppose we have three algorithms that perform


the same task and produce the same output
The first one is written in C++ and is running on a
HP Z220 workstation running Linux
The second one is written in Java and is running
on a Dell Inspiron 15 Laptop running Windows
The third one is written in Objective C and is
running on a Apple Macbook Pro running OS X
Which is the most efficient algorithm and which is
the least?
Would your answer change is we use a super
computer, an Android phone or a BlackBerry?