Data structure

advertisement
HORSEED International University
DATA STRUCTURE
Using C#
For Computer Science Department, Horseed International University
Presented By:
Eng. Mohamed Adam Isak (Eng. Afgoye)
Lecturer in Mogadishu university, University of Somalia and Horseed Int. University
M.Sc. And B.Sc. of Information Technology Engineering
Engmaisak@hotmail.com
Tell:0699370711
2013-2014
LECTURE 1- INTRODUCTION HOUR
OUTLINE
 Who is your Lecturer ?
 Course objectives
 Resources
 Course guidelines
 Assessment
 Course outlines
 What is Data Structures ?
• Static memory allocation
• Dynamic memory allocation
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
3
WHO IS YOUR LECTURER !!
 ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)
 Certificates:
• 2010-2013: M.Sc. in Information Technology Engineering, Title of the thesis:
“Mechanisms Implemented to Secure Cloud Computing”, The Libyan Academy,
Tripoli-Libya
•
June 2012-1 August 2012, Certificate: Accomplishment Diploma of Internet
History, Technology, and Security. University of Michigan- Washington. USA
•
2006- 2010: B.Sc. in Computer Science. Computer Science and Information
Technology Department, Islamic Call College. Tripoli - Libya.
•
Currently Job:
•
 Lecturer in Computer Science department in Mogadishu University and
University of Somalia.
Past Job:
 Head of Information Technology department of University of Libya
• E-mail: Engmaisak@hotmail.com
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
4
COURSE OBJECTIVES
•
To make the student capable of understanding & writing:
• The fundamental data structures in computer science
• Data Structure Algorithms using C# or any other Dot Net Language
•
To improve ability to solve problems abstractly
• Data structures are the building blocks
•
To improve ability to analyze your algorithms
• prove correctness
• Estimate and improve time complexity
•
To be familiar with C# programming language in advanced mode not as
essential.
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
5
RESOURCES
•
Power point files prepared by the lecturer.
•
Books:
•
“Theory and Problems of Data Structures” by Seymour Lipschutz,
McGraw-Hill.
•
“C# How to Program”,, By H. M. Deitel - Deitel & Associates, Inc., 6th
Edition, P. J. Deitel - Deitel & Associates, Inc.
•
“C++ Plus Data Structures” , 3rd edition, by Nell Dale, university of Taxes
in U.S.
•
“Data Structures & Algorithm Analysis in C++”, 2nd edition, by Mark
Allen Weiss
•
“Data Structure using C++”, by D.S. Malik, 2nd edition
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
6
COURSE GUIDELINES
 We have a common goal: It is my job to teach you what you need to
know. Therefore…
 Ask me questions.
 Do NOT let me continue if you aren’t clear about something and
remember that: question is the half of knowledge.
 If I go too fast, ask me to slow down.
 If I use a term that you aren’t familiar with, ask me for a
definition.
 Attendance: is encouraged and required.
 Study lecture by lecture:
 Plagiarism is strictly punished: Don’t associate people’s work to
yourself. Site everything you include in your reports that is not your
original work.
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
7
ASSESSMENT
20
Mid term
60
Semester work
100
40
Final Exam
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
20
Home works & Quizzes
20
Project
8
SENDING HOME WORKS & QUESTIONS
 All home work must be send to my e-mail
(ENGMAISAK@HOTMAIL.COM).
 You must set the title of your mail as
 Data Structure – HORSEED University - Homework – your name –
HW#
 You must respect the dead Line of sending home work.
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
9
STUDY HOURS
 Study Hours are a greatly time to have a good Science.
 They are yours.
 Every
 Tuesday (8:00 To 10:00 AM)
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
10
COVERED TOPICS
 Fundamentals of Data Structure
 Fundamentals of C#
 Array data structure
 Sorting Arrays
 Swapping
 Searching Arrays
 Insert elements
 Recursion
 Linked Lists
 Stacks
 Queues
 Trees
 Collection Classes
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
11
NEED FOR KNOWLEDGE OF DATA
STRUCTURES
 Good programming and problem solving requires knowledge of data
structures.
 Without a sufficient understanding of data structures, the level at which
a programmer can work will be severely limited.
 An important distinguishing characteristics of data structures is the
manner in which they are organized.
 Data structures are categorized as linear or dynamic depending on their
allocation strategy.
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
12
MOTIVATION FOR DATA STRUCTURES
 In a beginning programming courses, variables are introduced that store
as single.
 However, some times we need to store multiple related data items for
convenience. For example, data items like students records many need to
be stored under a single name for ease of processing.
 Such convenient structuring of data is called data organization a container
for the data is called data structure.
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
13
MOTIVATION FOR DATA STRUCTURES
(CONTD.)
 A data structure could be a programming construct provided in a language
or it can be defined by the programmer.
 Example of data structure include:
Arrays, Linked lists, Stacks, Queues, Trees, Graphs
 Data structures are applied in sorting, searching, data compressing etc.
 A course in data structure is a core course in most undergraduate
Computer Science degree program.
 The contents of this course has not changed much in the last two decades
except for inclusion of some new algorithms.
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
14
WHAT IS DATA STRUCTURES ?
• A Data structure is the collection of basic data types.
• A data structure is a representation of data and the operations
allowed on that data.
OR
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
15
STATIC MEMORY ALLOCATION
 Static memory allocation means the program must obtain its space
before the execution and can not obtain more while or after
execution.
 The limit of the static memory allocation is the maximum limit of the
data type.
 Example: array data structure
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
16
DYNAMIC MEMORY ALLOCATION
 The dynamic memory allocation is the ability for a program to obtain
more memory space at execution time to hold new nodes and to
release space no longer needed.
 The limit for dynamic memory allocation can be as large as the
amount of available physical memory.
•
Creating and maintaining dynamic data structures requires dynamic
memory allocation.
• Dynamic data structures as:
• Linked Lists
• Stacks
• Queues
• Trees
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
17
DATA STRUCTURE OPERATIONS
•
Frequently used operations in any data structure is
• Traversing/Navigating: Accessing each record exactly once so that
certain items in the record may be processed.
• Searching: Finding the location of the record with a given key value,
or finding the locations of all records which satisfy one or more
conditions.
• Inserting: Adding a new record to the structure.
• Deleting: Removing a record from the structure.
• Sorting: Arranging the records in some logical order.
• Merging: Combining the records in two different sorted files into a
single sorted file.
…………………………………………………
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
18
C# FOR DATA STRUCTURE PRACTICAL
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
19
NEXT LECTURE
if C# is learned
Arrays structure and Algorithms;
else
C# in two hours;
PRESENTED & PREPARED BY: ENG.
MOHAMED ADAM ISAK (ENG. AFGOYE)
20
Download