Summary Session 1 Data Structures
Data structures is the most fundamental, building block and good knowledge of data structures is a must to design and develop efficient software systems . We deal with data all the the like how we store , organized all the activity that are similar like grouping a data .
EXP :
City Map
usually when we open a digital map we often search the location where we want to go and type the location address or coordinates . The map quickly search it and in a blink of an eye the map calculate the route and estimated the time to reach our destination . we are able to search the word quickly and efficiently because all the location and coordinates in the map database are sorted . So what if the maps location and coordinates are unsorted ? The answer is it would be in practical and impossible to search the location are similar to possible among billion location that you search . so the map are organized to a sorted list of location and coordinates .
Different kind of structure are needed to organized all kind of data in this planet as long it can be read by a computer . How we stored organized and group in a computer are matters because computers deal with a extremely large data even with many computational machine if we cant deal with a right kid of logical structures and the software system will not be efficient .
Data structures is a way to store and organized data in a computer so it can be used efficiently .
The types of data structure are:
Lists: A group of similar items with connectivity to the previous or/and next data items.
Arrays: A set of homogeneous values
Records: A set of fields, where each field consists of data belongs to one data type.
Trees: A data structure where the data is organized in a hierarchical structure. This type of data structure follows the sorted order of insertion, deletion and modification of data items.
Tables: Data is persisted in the form of rows and columns. These are similar to records, where the result or manipulation of data is reflected for the whole table.
Abstract Data Types (ADT)
Adt is type defined in terms of its data items and associated operation , not its implementation . If we change those implementation it can change the performance or behavior to the operation itself .
EXP :
Driving A CAR
Like we now the basic knowledge to driving a car is steering wheel is to point the direction of the car and the pedal is to accelerate , breaks and change gear. But we dont know how the implementations work . That doesnt mean we dont know what the engine looks like , we now but the engine its hidden or its protected by a body of a car and if we change or modified the engine we know it makes the performances of the car we drive change .
Linked list
To understand what linked list is we must now what a queue is .
Queue
a set of element that the first element we input must have to be the first to gets taken (First in First Out /FIFO)
Simple steps to understand Linked list:
- Make a struct
- Declare variable pointer
- Memory allocation
- Fill the data in memory
- link to list
EXP :
Note: each box start with 1 (head) and ends with 4(tail)
Find number 3 : while ( currenen != 3) head –>next
delete number 3 : temp –> next = temp –> next –>next || temp –>next = del –> next
all we know to move a block or delete a block wa have to pass by queue it has to be FIFO
Kind of Linked List :
- requrenant
- struct
- nested struct
Review:
1.Pointer
is a variable which contains the address in memory of another variable.
2.Array
Is a set of data that similar and its homogenous (have the same type of data).
Array is stored by memory sequentially or it has been reserved by a memory and it can be reference by an index (array index is always start from 0) .
Kind of arrays :
1.Normal arrays

2. Circular array

3. Priority array


One thought on “Summary Session 1 Data Structures”