Access Millions of academic & study documents

Data structure

Content type
User Generated
Showing Page:
1/6
Data structure by Saadat Ullah
Prepared by: Dr UK Khan
Data Structure:
Data Structure can be defined as the group of data elements which provides an efficient way
of storing and organizing data in the computer so that it can be used efficiently.
Linear
A Linear data structure has data elements arranged in sequential manner and each member
element is connected to its previous and next element. Such data structures are easy to
implement as computer memory is also sequential. Examples of linear data structures are
List, Queue, Stack, Array etc
Non-linear
A non-linear data structure has no set sequence of connecting all its elements and each
element can have multiple paths to connect to other elements. Such data structures support
multi-level storage and often cannot be traversed in single run. Examples of non-linear data
structures are Tree, BST, and Graphs etc.
Static Data structure
Static Data structure has fixed memory size whereas in Dynamic Data Structure, the size can
be randomly updated during run time which may be considered efficient with respect to
memory complexity of the code
Dynamic data structure (DDS)
A dynamic data structure (DDS) refers to an organization or collection of data in memory
that has the flexibility to grow or shrink in size, enabling a programmer to control exactly
how much memory is utilized.
Abstraction:
The process of providing only the essentials and hiding the details is known as abstraction.
Abstract data types:
Abstract Data type (ADT) is a type (or class) for objects whose behavior is defined by a set
of value and a set of operations.
List ADT
Generally stored in key sequence in a list which has a head structure consisting of count,
pointers and address of compare function needed to compare the data in the list
Stack ADT
A Stack contains elements of the same type arranged in sequential order. All operations
take place at a single end that is top of the stack
Queue ADT
A Queue contains elements of the same type arranged in sequential order. Operations take
place at both ends, insertion is done at the end and deletion is done at the front.
Algorithm:
Algorithm is a step-by-step procedure, which defines a set of instructions to be executed in a
certain order to get the desired output.

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/6
Data structure by Saadat Ullah
Prepared by: Dr UK Khan
Algorithms for various data structures:
Search:
Algorithm to search items in a data structure
Sort:
Algorithm to sort an item in certain order
Update:
Algorithm to update an existing item in data structure
Insert:
Algorithm to insert item in data structure
Delete:
Algorithm to delete an existing item from a data structure
A storage array:
A storage array, also called a disk array, is a data storage system for block-based
storage, file-based storage, or object storage. Rather than store data on a server, storage arrays
use multiple drives in a collection capable of storing a huge amount of data, managed by a
central management system.
Retrieval:
Retrieval having stored the data file in the computer the retrieval program should
allow the user to query the data in the file and to retrieve selected parts of it. Depending on
the particular application, single queries might be useful or a more regular reporting
appropriate. In either event the amount of data output might be large or small and again, on-
or off-line working would be appropriate in the different circumstances. On-line working
would be particularly useful where the results of one query would be used in formulating the
next query and the user is 'experimenting' with the data. Assuming that the computer system
being used does not allow a query to be specified in such a free manner, it will be necessary
for the
Stack:
A stack is an Abstract Data Type (ADT), commonly used in most programming
languages. It is named stack as it behaves like a real-world stack, for example a deck of
cards or a pile of plates, etc.
For example, we can place or remove a card or plate from the top of the stack only.
Queue:
Queue is an abstract data structure, somewhat similar to Stacks. Unlike stacks, a
queue is open at both its ends. One end is always used to insert data (enqueue) and the other
is used to remove data (dequeue).
There are three basic types of ques:
A standard queue
In this section we will discuss how you can, if required, implement an efficient queue
data structure. The main property of a queue is that we have access to the item at the front of
the queue. The queue data structure can be efficiently implemented using a singly linked list.
Since we always have a pointer to the item at the head of a singly linked list, removal is
simply a case of returning the value of the old head node, and then modifying the head
pointer to be the next node of the old head node
Priority Queue

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/6

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 6 pages?
Access Now
Unformatted Attachment Preview
Data structure by Saadat Ullah Data Structure: Data Structure can be defined as the group of data elements which provides an efficient way of storing and organizing data in the computer so that it can be used efficiently. Linear A Linear data structure has data elements arranged in sequential manner and each member element is connected to its previous and next element. Such data structures are easy to implement as computer memory is also sequential. Examples of linear data structures are List, Queue, Stack, Array etc Non-linear A non-linear data structure has no set sequence of connecting all its elements and each element can have multiple paths to connect to other elements. Such data structures support multi-level storage and often cannot be traversed in single run. Examples of non-linear data structures are Tree, BST, and Graphs etc. Static Data structure Static Data structure has fixed memory size whereas in Dynamic Data Structure, the size can be randomly updated during run time which may be considered efficient with respect to memory complexity of the code Dynamic data structure (DDS) A dynamic data structure (DDS) refers to an organization or collection of data in memory that has the flexibility to grow or shrink in size, enabling a programmer to control exactly how much memory is utilized. Abstraction: The process of providing only the essentials and hiding the details is known as abstraction. Abstract data types: Abstract Data type (ADT) is a type (or class) f ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Similar Documents