0% found this document useful (0 votes)
66 views5 pages

Data Structure Notes

Uploaded by

geded92215
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views5 pages

Data Structure Notes

Uploaded by

geded92215
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

MAHARANA PRATAP GOVT.

DEGREE COLLEGE, AMB

Data Structure Notes


Particularly designed for HPU
Ami Kanwar

Helpful stuff for the students who believe in self learning.


Unit 1:
Preliminaries: Concept & notation, common on data structures, algorithm
complexity, time-space trade off between algorithm, physical & logical
representation of different data structures.

Arrays: Arrays defined, representing arrays in memory, various operation


(transversal, insertion, deletion), Multidimensional arrays, Sequential allocation,
Address Calculation.

Introduction to Data Structures & Algorithms:


Data Structure is the arrangement of data in the memory (main memory
specially) so that they can be used efficiently. For example Arrays, Stack, Queue,
Linked List etc. Algorithm is the sequence of steps to solve a given problem. For
example sorting in array.

Data Structure:
Data structure is not itself a programming language. Data structure is the
concepts (so that we can access data efficiently) which are
implemented/completed with the help of any programming language. In other
words Data Structure is the process or way of storing and organizing the data in
computer memory in such a way so that it can accessed by user easily and
efficiently.

Definition: The organized collection of data in a mathematical or logical way is


called data structure.

Data structure is defined as triplet (D,F,A) where “D” stands for set of domain, “F”
denotes the set of operations and “A” represents axioms defining the function in
“F”.
Data-> Data means raw facts and figures. Data is very valuable raw material
which is used to make information. Data can be in different form such as
numbers, words, alphabets, diagrams etc. It is of two types:
• Atomic Data: Non decomposable entity
• Composite Data: Decomposable entity

Atomic Data: The data which is not further subdivided. For example: 69 or any
alphabet X.
Composite Data: It is the most fundamental data level which is used as a building
block for all other data in a system. It consists several atomic data and hence it
can further sub divided. For example Roll no.: 69 is the composite data.

Types of Data Structure:

Data Structure

Linear Non Linear

Array Stack Queue Link List

Tree Graph
Linear and Non Linear data structure
Linear data Structures:

This is a type of data structures in which elements are organized in a linear or


sequential order. In simple words we can say that data elements in a linear data
structure are stored one after another. Due to memory organization is in linear
fashion, so this type of data structure can be easily accessed. Example of linear
data structure is array, stack, queue and link list.

• A data structure whose elements forms a proper sequence or having a


sequential structure.
• It has a unique predecessor and unique success.
Example: Array, Link list, Stack, Queues.
• It is comprised of ordered set of data elements. Let us consider a Linear List
X having n elements as
X=[X0, X1, X2….Xn-1]
• If n is 0, it is called as empty list.
• It can be implemented through static or dynamic structure but static data
structure is preferred.

Non Linear Data Structure:

This type of data structure in which data is not organized in sequential or linear
fashion. A data items in a non linear data structure could be attached to several
other data elements to reflect a special relationship among them and all the data
items cannot be transverse in a single run. Data structure like multidimensional
arrays, trees and graphs are some examples of widely used nonlinear data
structures. A data structure in which data is organized in random order.

• A data structure whose elements do not forms a sequence or having a


complex structure.
• There is no unique predecessor and unique successor.
• The operation like traversing, insertion and deletion are not in a linear
fashion on these data structures.
• These data structure are multi level structure.
Example: Trees and Graphs

Difference between Linear and Non Linear Data Structures:


Main difference between linear and non linear data structures lie in the way they
organize data elements. In linear data structures, data elements are organized
sequentially and therefore they are easy to implement in the computer’s
memory. In non linear data structures, data elements can be attached to several
other data elements to represent specific relationships that exist among them.

You might also like