0% found this document useful (0 votes)
41 views31 pages

Lec1 (DONE)

The document introduces a data structures course, covering topics like course administration, policies, goals, and an introduction to key concepts like data structures, algorithms, abstract data types, and mathematical foundations. It emphasizes selecting appropriate data structures to efficiently solve problems.

Uploaded by

mhmdadel.test.1
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)
41 views31 pages

Lec1 (DONE)

The document introduces a data structures course, covering topics like course administration, policies, goals, and an introduction to key concepts like data structures, algorithms, abstract data types, and mathematical foundations. It emphasizes selecting appropriate data structures to efficiently solve problems.

Uploaded by

mhmdadel.test.1
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/ 31

‫بسم هللا الرحمن الرحيم‬

‫‪1‬‬
‫‪Prof. Ossama Ismail‬‬
Data Structures

Lecture 1:
Introduction 1.0

2
Prof. Ossama Ismail
Class Administration
• On –Campus Lectures, Monday 8:30am and at 10:30am
• Instructor:
– Prof. Ossama Ismail
– Email: ossama@aast.edu & Ossama.m.i@gmail.com
• Teaching Assistant
Eng. …
Email:

TextBook : DATA STRUCTURE


By : Noel Kalicharan

3
Prof. Ossama Ismail

Course Policies
• Roughly weekly written homework due at the start
of class on the due date
• Projects (2 total) due by 10PM on the due date
• you have 4 late days for projects
• Grading
• Mid-term Exam 20%
• Homeworks 10%
• Lab Exam 20%
• Projects 20%
• Final Exam 50%
• Best of these 10%
4
Prof. Ossama Ismail
Read Ahead
• You are expected to read the PPT notes
before the class.

• This will make our discussion more


productive.

• It is very important to read your text Book.


• SOLVE ALL ASIGNMNETS AND TESTS
5
Prof. Ossama Ismail
Data Structures
• Objectives

➢ Introduce the student to algorithmic analysis.


➢ Introduce the student to the fundamental data
structures.
➢ Introduce the student to problem solving
paradigms.

6
Prof. Ossama Ismail
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
• Improve ability to analyze your algorithms
• prove correctness
• gauge (and improve) time complexity

7
Prof. Ossama Ismail
Course Overview
• Introduction to many of the basic data structures used in
computer software
• Understand the data structures
• Analyze the algorithms that use them
• Know when to apply them
• Practice design and analysis of data structures.
• Practice using these data structures by writing programs.
• Make the transformation from programmer to computer
scientist
Prof. Ossama Ismail
Course requirements
• Learn a programming language like C/C++/Java is
suitable for this course.
• Practice what you've learnt by writing simple codes.
You can find them very well-known ones everywhere
online. But you must understand them !!!
• Get familiar with the concepts of pointers by learning
C.

9
Prof. Ossama Ismail
Goals
• You will understand
• what the tools are for storing and processing common
data types
• which tools are appropriate for which need
• So that you can
• make good design choices as a developer, project
manager, or system customer
• You will be able to
• Justify your design decisions via formal reasoning
• Communicate ideas about programs clearly and
precisely

Prof. Ossama Ismail


What is Data Structures ?
Data structure is a “Clever” ways to organize
information in order to enable efficient
computation

• What do we mean by clever?


• What do we mean by efficient?

11
Prof. Ossama Ismail
Classification of Data Structure

12
Prof. Ossama Ismail
The Need for Data Structures
Data structures organize data
 more efficient programs.
More powerful computers  more complex
applications.
More complex applications demand more
calculations.
Complex computing tasks are unlike our everyday
experience.

13
Prof. Ossama Ismail
Organizing Data

Any organization for a collection of records


can be searched, processed in any order, or
modified.

The choice of data structure and algorithm can


make the difference between a program
running in a few seconds or many days.

Prof. Ossama Ismail


Selection of the best
Data Structure for certain task

• The data structure you choose needs to


support the operations you need
• Ideally it supports the operations you will use
most often in an efficient manner
• Examples of operations:
• A List with operations insert and delete
• A Stack with operations push and pop

15
Prof. Ossama Ismail
Select a data structure as follows:
1. Analyze the problem to determine the
resource constraints a solution must
meet.
2. Determine the basic operations that must
be supported. Quantify the resource
constraints for each operation.
3. Select the data structure that best meets
these requirements.

16
Prof. Ossama Ismail
Efficiency
A solution is said to be efficient if it solves the problem
within its resource constraints.
• Space
• Time
• The cost of a solution is the amount of resources that
the solution consumes.

Prof. Ossama Ismail


Terminology
Abstract Data Type (ADT)

• (ADT): a definition for a data type solely in terms of a set


of values and a set of operations on that data type.

• Mathematical description of an object with set of


operations on the object. Useful building block.

Each ADT operation is defined by its inputs and


outputs.

Encapsulation: Hide implementation details.


18
Prof. Ossama Ismail
Data Structure
• A data structure is the physical implementation
of an ADT.
• Each operation associated with the ADT is
implemented by one or more function in the
implementation.
• Data structure usually refers to an organization
for data in main memory.
• File structure is an organization for data on
peripheral storage, such as a disk drive.
19
Prof. Ossama Ismail
• Algorithm
• An algorithm takes the input to a problem (function)
and transforms it to the output.
• A mapping of input to output.

• A high level, language independent, description of a


step-by-step process

• A problem can have many algorithms.


• Algorithm Properties:

20
Prof. Ossama Ismail
• Algorithm Properties:
• It must be correct.
• It must be composed of a series of concrete steps.
• There can be no ambiguity as to which step will be
performed next.
• It must be composed of a finite number of steps.
• It must terminate.

• Implementation of data structure


• A specific implementation in a specific language

21
Prof. Ossama Ismail
• Implementation of data structure
• A specific implementation in a specific language

22
Prof. Ossama Ismail
Why So Many Data Structures?
Ideal data structure:
“fast”, “elegant”, memory efficient
Generates tensions:
• time vs. space
• performance vs. elegance
• generality vs. simplicity
• one operation’s performance vs. another’s

23
Prof. Ossama Ismail
Examples

• A stack is an abstract data type supporting push,


pop and isEmpty operations

• A stack data structure could use an array, a linked


list, or anything that can hold data

24
Prof. Ossama Ismail
ADT vs Data Structures
Available Data Types

ADT:
Data Items:
Type
Logical Form
Operations

Data Structure: Data Items:


Storage Space Physical Form
Subroutines

25
Prof. Ossama Ismail
Mathematical Background
• Set concepts and notation.
• Recursion
• Induction Proofs
• Logarithms
• Summations
• Recurrence Relations

26
Prof. Ossama Ismail
What is Program
• A Set of Instructions
• Data Structures + Algorithms

Where,
• Data Structure = A Container stores Data
• Algorithm = Logic + Control

27
Prof. Ossama Ismail
Functions of Data Structures
• Add
• Index
• Key
• Position
• Priority
• Get
• Change
• Delete

Prof. Ossama Ismail


Common Data Structures
• Array
• Stack
• Queue
• Linked List
• Tree
• Heap
• Hash Table
• Priority Queue

Prof. Ossama Ismail


• Dynamic data structures
• Data structures that grow and shrink during execution
• Linked lists
• Allow insertions and removals anywhere
• Stacks
• Allow insertions and removals only at top of stack
• Queues
• Allow insertions at the back and removals from the
front
• Binary trees
• High-speed searching and sorting of data and efficient
elimination of duplicate data items
30
Prof. Ossama Ismail
Questions ????

31
Prof. Ossama Ismail

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy