Introduction To DataStructurePpt
Introduction To DataStructurePpt
STRUCTURE
DATA STRUCTURE
Introduction
مقدمة
لماذا عليك الخوارزميات وهياكل البيانات
-1تحسين طريقة تفكيرك.
-سوف تصبح اكثر إدراكا للكود الذي تكتبه
مقدمة
– 2وضوح األفكار وتنظيمها
-مثال :مطلوب منك ان تجد اعلى معدل بين مجموعة طالب
◦ حيث أن الشركات العالمية تعتمد على مسائل حول مفاهيم الخوارزميات وهياكل البيانات في
اختباراتها وطرق تقييمها.
◦ For example, we can store a list of items having the same data-type using the array data structure.
The representation of particular data structure in the main memory of a computer is called as storage structure.
The storage structure representation in auxiliary memory is called as file structure.
It is define as the way of storing and manipulating data in organized form so that it can be used efficiently
Data Structure mainly specifies the following four things:
1)organization of data 2)accessing method 3)degree of associativity 4) processing alternative for information
Algorithm + Data Structure = Program
Data Structure study Covers the following points
1) Amount of memory require to store
2) Amount of time require to process
3) Representation of data in memory
4) Operations performs on data
أنواع هياكل البيانات
Types Of DS
◦ Every item is related to its previous and next ◦ Every item is attached with many other items.
item. ◦ Data is not arranged in sequence.
◦ Data is arranged in linear sequence.
◦ Data cannot be traversed in a single run.
◦ Data items can be traversed in a single run
◦ E.g. Tree, Graph
◦ E.g. Array, Stacks, Linked list, Queue
◦ Implementation is difficult.
◦ Implementation is easy.
Operation on Data Structures
Design of efficient data structure must take operations to be performed on the DS into account. The most commonly
used operations on DS are broadly categorized into following types
1. Create: This operation results in reserving memory for program elements. This can be done by declaration
statement Creation of DS may take place either during compile-time or run-time.
2. Destroy: This operation destroy memory space allocated for specified data structure .
3. Selection: This operation deals with accessing a particular data within a data structure.
4. Updation: It updates or modifies the data in the data structure.
5. Searching: It finds the presence of desired data item in the list of data items, it may also find locations of all
elements that satisfy certain conditions.
6. Sorting: This is a process of arranging all data items in a DS in particular order, for example either ascending order
or in descending order.
7. Splitting: It is a process of partitioning single list to multiple list.
8. Merging: It is a process of combining data items of two different sorted list into single sorted list.
9. Traversing: It is a process of visiting each and every node of a list in systematic manner.
What are Arrays?
Syntax
arrayName[indexNum]
Example
balance[1]
Here, we have accessed the second value of the array using its index, which is 1.
The output of this will be 200, which is basically the second value of the balance
array.
◦ Array Representation
◦ Arrays can be declared in various ways in different languages. For illustration, let's take C array declaration.