Data structure

20
DATA STRUCTURE 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 [email protected] Tell:0699370711 Using C# RSEED International Universit 2013-2014

description

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 - PowerPoint PPT Presentation

Transcript of Data structure

Page 1: Data structure

DATA STRUCTURE

For Computer Science Department, Horseed International UniversityPresented By:

Eng. Mohamed Adam Isak (Eng. Afgoye)Lecturer in Mogadishu university, University of Somalia and Horseed Int.

UniversityM.Sc. And B.Sc. of Information Technology Engineering

[email protected]:0699370711

Using C#

HORSEED International University

2013-2014

Page 2: Data structure

LECTURE 1- INTRODUCTION HOUR

Page 3: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

3

OUTLINEWho is your Lecturer ?Course objectivesResourcesCourse guidelines AssessmentCourse outlinesWhat is Data Structures ?

• Static memory allocation• Dynamic memory allocation

Page 4: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

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: [email protected]

4

Page 5: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

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.

5

Page 6: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

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

6

Page 7: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

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.

7

Page 8: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

ASSESSMENT

8

100

60Semester work

20Mid term

20Home works & Quizzes

20Project

40Final Exam

Page 9: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

SENDING HOME WORKS & QUESTIONS

All home work must be send to my e-mail

([email protected]). 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.

9

Page 10: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

STUDY HOURS

Study Hours are a greatly time to have a good Science. They are yours. Every

Tuesday (8:00 To 10:00 AM)

10

Page 11: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

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

11

Page 12: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

12

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.

Page 13: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

13

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.

Page 14: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

14

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.

Page 15: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

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

15

Page 16: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

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

16

Page 17: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

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

17

Later !!!!!!!

Page 18: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

18

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.…………………………………………………

Page 19: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

19

C# FOR DATA STRUCTURE PRACTICAL

Page 20: Data structure

PRESENTED & PREPARED BY: ENG. MOHAMED ADAM ISAK (ENG. AFGOYE)

20

NEXT LECTURE

if C# is learned Arrays structure and Algorithms;

else C# in two hours;