0% found this document useful (0 votes)
4 views27 pages

Intro

The document outlines the course CMP1040: Data Structures and Algorithms, detailing the course introduction, learning objectives, topics covered, textbooks, grading policies, and attendance requirements. It emphasizes the importance of understanding Abstract Data Types (ADTs) and their implementations, as well as the necessity of adhering to academic integrity policies. The course aims to enhance algorithmic and programming skills while managing tasks and resources effectively.

Uploaded by

Ahmed Wagih
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views27 pages

Intro

The document outlines the course CMP1040: Data Structures and Algorithms, detailing the course introduction, learning objectives, topics covered, textbooks, grading policies, and attendance requirements. It emphasizes the importance of understanding Abstract Data Types (ADTs) and their implementations, as well as the necessity of adhering to academic integrity policies. The course aims to enhance algorithmic and programming skills while managing tasks and resources effectively.

Uploaded by

Ahmed Wagih
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

CMP1040: Data Structures and Algorithms

Lecture 00: Course Introduction


Ahmed Hamdy
Computer Engineering Department
Cairo University
Contact Info
• How to reach me :
– Email:
[email protected]
– Office Hours:
• Sunday: 2 PM – 4 PM
• Email me your request to meet
LOs
1. Know basic data structures and ADTs (lists, stacks, queues, trees, graphs,
hash tables and heaps).
2. Understand basic algorithms (sorting and searching).
3. Analyze algorithm complexity.
4. Write computer programs.
5. Work in stressful environment and within constraints while effectively
manage tasks, time, and resources.
Topics
• Introduction
• Recursion
• Lists
• Algorithm complexity
• Stacks
• Queues
• Trees
• Sorting
• Searching
• Graphs
Courtesy of https://github.com/itsnitinr/data-structures
Textbook 1
• Data Abstraction & Problem Solving with C++, Walls and Mirros, Frank M.
Carrano and Timothy M. Henry, 7th Edition.
Textbook 2
• Data Structures, A Pseudocode Approach with C, Richard F. Gilberg and
Behrouz A. Forouzan, 2nd Edition.
Slides
Adapted from:
– Both textbooks

– Dr. Magda Fayek slides

– As referenced from the web


Grading
Final 90
Coursework 60:
Midterm 20
Project 15
Labs 8
Lab exam 8
Quizzes 6
Assignments 3

Total 150
Coursework
• Goals:
– Enhance algorithmic skills
– Enhance programming skills
• Policy:
– NO collaboration in implementation
– NO internet searching for implementations
– Copying results in ZERO grade in up-to all of coursework. No exceptions!
What is Plagiarism??

Courtesy of top-papers.com
Policies
• Attendance recorded every lecture, 25% absence limit.
• Entering/leaving policy
– Entry prohibited after 15 mins
– Leave for urgent cases only
• Mobiles vibration/silent

• Talking policy

• Asking/answering policy
Learning Psychology

Never ever to start learning with a psychological


1 barrier, it is a self-fulfilling prophecy.

2 Learn by example, then generalize.

3 Start with simple examples, then complex ones.

4 Explain to your colleagues to master the concept.


Course Introduction
What is an Abstract Data Type (ADT) ?

• An ADT is defined by its behavior, i.e. the set of


functions that can be performed on it.

• Walls separate the implementation of Abstract Data


Type providing ONLY the interface (BEHAVIOR) to
the ADT

17
Walls
Walls ADT
The program does not access the data structure!

19

The program only accesses the provided operations!


ADT Examples
• BAG ADT
• List ADT
• Table ADT
• Tree ADT
• Graph ADT
ADT Example: Group of Students

• To the program they are just a group of students


organized as a specific ADT.

• The program only specifies the main operations


(behavior) it needs to perform on the students’ group,
it does not see HOW they are structured.

21
ADT Example: Group of Students

• How is the ADT determined?


▪ If all we need is the collection of students with no
interrelation, then it is an BAG ADT.

▪ If there is a certain sequence of the students that should


be kept then the ADT used will be probably a LIST ADT.

22
ADT Example: Group of Students

▪ If in addition they need to be kept sorted it will be a TABLE


(dictionary) ADT.

▪ If students are divided in groups or hierarchy, each having


a leader, the Tree ADT is used.

▪ If the main operations are finding the friendship or relation


between students then the ADT will be a GRAPH.

23
ADT Example: Group of Students
• The operations specified by the program (or user) determine
the suitable ADT but not the DATA STRUCTURE by which
the ADT is implemented.

• The data structure used should facilitate the implementation


of the interface (behavior)of the ADT.

24
ADT Example: Group of Students

…. HENCE
→The nature of the problem determines the most suitable
ADT for representation.

→Once the ADT is selected, then we only see the


operations associated with the selected ADT, and NOT how
the ADT is implemented (data structure).

25
ADT Example: Group of Students

Even….
→In some applications, we might need various operations
or different ways to access the data FAST that are not
supported by one ADT, so we might use TWO different
ADTs to represent the same data.
• Access the student record using student’s ID.
• Access the student record using student’s name.

26
Wrap-Up

• An Abstract Data Type (ADT) is specified by its behavior →


operations performed on it through an interface.
• The implementation of an ADT is hidden behind a wall.
• An ADT can be implemented by different data structures, while the
interface remains the same.
• The data structure chosen in implementation affects the efficiency
of the interface operation functions.

28
Wrap-Up
• Our study will be concerned with BOTH sides of the wall:

– Technically: the representation (implementation) will be


studied to see how operation efficiency is affected.

– From Applications point of view: to select the most


suitable ADT for a specific application.

29
Questions?

You might also like