0% found this document useful (0 votes)
8 views

Lec2 Introduction - 2

This document provides an overview of a data structures course. It discusses how data structures enable efficient computation through clever organization of information. Some key data structures covered include lists, stacks, queues, heaps, binary search trees, hash tables, and graphs. The document emphasizes that mastery of data structures is important and provides transferable skills. It also notes that the course will focus on abstract data types and analyzing various properties of data structures rather than focusing on a specific programming language.

Uploaded by

Prhna Wala Bacha
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Lec2 Introduction - 2

This document provides an overview of a data structures course. It discusses how data structures enable efficient computation through clever organization of information. Some key data structures covered include lists, stacks, queues, heaps, binary search trees, hash tables, and graphs. The document emphasizes that mastery of data structures is important and provides transferable skills. It also notes that the course will focus on abstract data types and analyzing various properties of data structures rather than focusing on a specific programming language.

Uploaded by

Prhna Wala Bacha
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 10

CS-2001

Data Structures
FALL 2022
Abstract Data Types - ADT

Mr. Muhammad Usman Joyia


National University of Computer and
Emerging Sciences,
Faisalabad, Pakistan.
What is this Course About?

Clever ways to organize information in order to enable efficient


computation

– What do we mean by clever?

– What do we mean by efficient?


Clever? Efficient?

Lists, Stacks, Queues Insert


Heaps
Binary Search Trees Delete
AVL Trees
Find
Hash Tables
Graphs Merge
Disjoint Sets
Shortest Paths
Union
Data Structures Algorithms
Graphics
Theory AI

Operating Systems Database Applications

Used Everywhere!

Mastery of this material


separates you from:

• Perhaps the most important course in your CS curriculum!


• Guaranteed non-obsolescence!
Specific Goals of the Course

• Become familiar with some of the fundamental data structures in


computer science
• Improve ability to solve problems abstractly
– data structures are the building blocks
C++  Data Structures

• One of the all-time great books in computer science:


• The Art of Computer Programming (1968-1973)
– by Donald Knuth
• Examples in assembly language (and English)!

American Scientist
says: in top 12 books
of the CENTURY!

Very little about C++ in class.


Abstract Data Types

Abstract Data Type (ADT)


Mathematical description of an object
and the set of operations on the object

tradeoffs!

Data Types
integer, array, Operations
pointers, … Insert, search, delete,

Developing the ADTs

• Present an ADT
• Motivate with some applications
• Repeat until it’s time to move on:
– develop a data structure and algorithms for the ADT
– analyze its properties
 efficiency
 correctness
 limitations
 ease of programming
• Contrast strengths and weaknesses
First Example: Queue ADT

• Queue operations
– create
– destroy
– enqueue
– dequeue
– is_empty
• Queue property: if x is enQed before y is enQed, then x will be
deQed before y is deQed
• FIFO: First In First Out

enqueue FEDCB dequeue A


G
Applications of the Q

• Hold jobs for a printer


• Store packets on network routers
• Make waitlists fair
• Breadth first search

You might also like