0% found this document useful (0 votes)
9 views

Data Structure

Uploaded by

debjeet sengupta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Data Structure

Uploaded by

debjeet sengupta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

12/5/2018 IBPS (SO) I.T.

Officer : Data Structure Study Notes

All Exams STORE PRACTICE SEARCH

Banking IBPS PO ▾ IBPS Clerk ▾ RRB ▾ IBPS SO ▾ Noti cations ▾ Note

Home > Bank & Insurance > IBPS-SO :: IT O cer > Computer > Article

IBPS (SO) I.T.O cer : Data Structure Study Notes


376 upvotes 384 comments Nov 21, 2016 - 18:0

By: Vijay Kumar

Dear Aspirant,

Today we are covering the topics of Data Structures for IBPS Specialist O cer
2017 Exam. Data Structure is a way of collecting and organising data in such a way
that we can perform operations on these data in an effective way.
Data Structure
A data structure is a specialised way for organising and storing data in memory, so
that one can perform operations on it.
For example:
We have data player's name "Dhoni" and age 35. Here "Dhoni" is of String data type
and 35 is of integer data type.
Now we can organise this data as a record like Player record.
We can collect and store player's records in a le or database as a data structure.

IBPS Clerk Combo Pack 2018- Test Series on Latest Pattern - Attempt Now
Available in Hindi & English, Latest Pattern with All India Rank among thousands
of Aspirants

https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 1/12
12/5/2018 IBPS (SO) I.T.Officer : Data Structure Study Notes

For example: "Dhoni" 35, "Rahul" 24, "Rahane" 28.


All Exams STORE
"Data Structures are structures programmed to store ordered data PRACTICE
so that various SEARCH
operations can be performed on it easily."
Data structure is all about:

How to represent data element(s).


What relationship data elements have among themselves.
How to access data elements i.e., access methods

Types of Data Structure:


Primitive Data Structures : Integer, Float, Boolean, Char etc, all are data structures.

Abstract Data Structure: Used to store large and connected data.

Linked List
Tree
Graph
Stack, Queue etc.

Operations on Data Structures: The operations involve in data structure are as


follows.

Create: Used to allocate/reserve memory for the data element(s).


Destroy: This operation deallocate/destroy the memory space assigned to
the speci ed data structure.
Selection: Accessing a particular data within a data structure.
Update: For updation (insertion or deletion) of data in the data structure.
Searching: Used to nd out the presence of the speci ed data item in the
list of data item.
Sorting: Process of arranging all data items either in ascending or in
descending order.

https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 2/12
12/5/2018 IBPS (SO) I.T.Officer : Data Structure Study Notes

Merging: Process of combining data items of two different sorted lists of


data items into a single list.
All Exams STORE PRACTICE SEARCH

Stack
A stack is an ordered collection of items into which new items may be inserted and
from which items may be deleted at one end, called the TOP of the stack. It is a
LIFO (Last In First Out) kind of data structure.

Operations on Stack:

Push: Adds an item onto the stack. PUSH (s, i); Adds the item i to the top
of stack.
Pop: Removes the most-recently-pushed item from the stack. POP (s);
Removes the top element and returns it as a function value.
size(): It returns the number of elements in the queue.
isEmpty(): It returns true if queue is empty.

Implementation of Stack: A stack can be implemented using two ways: Array and
Linked list.
But since array sized is de ned at compile time, it can't grow dynamically.
Therefore, an attempt to insert/push an element into stack (which is implemented
through array) can cause a stack over ow situation, if it is already full.
Go, to avoid the above mentioned problem we need to use linked list to implement
a stack, because linked list can grow dynamically and shrink at runtime.
Applications of Stack: There are many applications of stack some of the important
applications are given below.

Backtracking. This is a process when you need to access the most recent
data element in a series of elements.
Depth rst Search can be implemented.
Function Calls: Different ways of organising the data are known as data
structures.
Simulation of Recursive calls: The compiler uses one such data structure
called stack for implementing normal as well as recursive function calls.
Parsing: Syntax analysis of compiler uses stack in parsing the program.
Expression Evaluation: How a stack can be used for checking on syntax of an
expression.
In x expression: It is the one, where the binary operator comes between
the operands.
e. g., A + B * C.
Post x expression: Here, the binary operator comes after the operands.
e.g., ABC * +

https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 3/12
12/5/2018 IBPS (SO) I.T.Officer : Data Structure Study Notes

Pre x expression: Here, the binary operator proceeds the operands.


e.g.,+ A * BC
All Exams STORE PRACTICE SEARCH

This pre x expression is equivalent to A + (B * C) in x expression. Pre x notation is


also known as Polish notation. Post x notation is also known as su x or Reverse
Polish notation.

Reversing a List: First push all the elements of string in stack and then pop
elements.
Expression conversion: In x to Post x, In x to Pre x, Post x to In x, and
Pre x to In x
Implementation of Towers of Hanoi
Computation of a cycle in the graph

Queue
It is a non-primitive, linear data structure in which elements are added/inserted at
one end (called the REAR) and elements are removed/deleted from the other end
(called the FRONT). A queue is logically a FIFO (First in First Out) type of list.
Operations on Queue:

Enqueue: Adds an item onto the end of the queue ENQUEUE(Q, i); Adds the
item i onto the end of queue.
Dequeue: Removes the item from the front of the queue. DEQUEUE (Q);
Removes the rst element and returns it as a function value.

Queue Implementation: Queue can be implemented in two ways.

Static implementation (using arrays)


Dynamic implementation (using painters)

Circular Queue: In a circular queue, the rst element comes just after the last
element or a circular queue is one in which the insertion of a new element is done
at the very rst location of the queue, if the last location of queue is full and the
rst location is empty.
Note:- A circular queue overcomes the problem of unutilised space in linear queues
implemented as arrays.
We can make following assumptions for circular queue.

Front will always be pointing to the rst element (as in linear queue).
If Front = Rear, the queue will be empty.
Each time a new element is inserted into the queue, the Rear is incremented
by 1.
Rear = Rear + 1

https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 4/12
12/5/2018 IBPS (SO) I.T.Officer : Data Structure Study Notes

Each time, an element is deleted from the queue, the value of Front is
incremented
All Examsby one. STORE PRACTICE SEARCH

Front = Front + 1

Double Ended Queue (DEQUE): It is a list of elements in which insertion and


deletion operations are performed from both the ends. That is why it is called
double-ended queue or DEQUE.
Priority Queues: This type of queue enables us to retrieve data items on the basis
of priority associated with them. Below are the two basic priority queue choices.
Sorted Array or List: It is very e cient to nd and delete the smallest element.
Maintaining sorted ness make the insertion of new elements slow.
Applications of Queue:

Breadth rst Search can be implemented.


CPU Scheduling
Handling of interrupts in real-time systems
Routing Algorithms
Computation of shortest paths
Computation a cycle in the graph

Linked Lists
Linked list is a special data structure in which data elements are linked to one
another. Here, each element is called a node which has two parts

Info part which stores the information.


Address or pointer part which holds the address of next element of same
type. Linked list is also known as self-referential structure.

Each element (node) of a list is comprising of two items: the data and a reference
to the next node.

The last node has a reference to NULL.


The entry point into a linked list is called the head of the list. It should be
noted that head is not a separate
node, but the reference to the rst node.
If the list is empty then the head is a null reference.

The Syntax of declaring a node which contains two elds in it one is for storing
information and another is for storing address of other node, so that one can
https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 5/12
12/5/2018 IBPS (SO) I.T.Officer : Data Structure Study Notes

traverse the list.


STORE
AdvantagesAll
ofExams
Linked List: PRACTICE SEARCH

Linked lists are dynamic data structure as they can grow and shrink during the
execution time.
E cient memory utilisation because here memory is not pre-allocated.
Insertions and deletions can be done very easily at the desired position.

Disadvantages of Linked List:

More memory is required, if the number of elds are, more.


Access to an arbitrary data item is time consuming.

Operations on Linked Lists: The following operations involve in linked list are as
given below

Creation: Used to create a liked list.


Insertion: Used to insert a new node in linked list at the speci ed position. A
new node may be inserted
At the beginning of a linked list
At the end of a linked list
At the speci ed position in a linked list
In case of empty list, a new node is inserted as a rst node.
Deletion: This operation is basically used to delete as item (a node). A node
may be deleted from the
Beginning of a linked list.
End of a linked list.
Speci ed position in the list.
Traversing: It is a process of going through (accessing) all the nodes of a
linked list from one end to the other end.

Types of Linked Lists

Singly Linked List: In this type of linked list, each node has only one address
eld which points to the next node. So, the main disadvantage of this type of
list is that we can’t access the predecessor of node from the current node.
Doubly Linked List: Each node of linked list is having two address elds (or
links) which help in accessing both the successor node (next node) and
predecessor node (previous node).
Circular Linked List: It has address of rst node in the link (or address) eld of
last node.
Circular Doubly Linked List: It has both the previous and next pointer in
circular manner.

https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 6/12
12/5/2018 IBPS (SO) I.T.Officer : Data Structure Study Notes

Tree
All Exams STORE PRACTICE SEARCH
Tree is a non-linear and hierarchical Data Structure.

Trees are used to represent data containing a hierarchical relationship between


elements e. g., records, family trees and table contents. A tree is the data structure
that is based on hierarchical tree structure with set of nodes.

Node: Each data item in a tree.


Root: First or top data item in hierarchical arrangement.
Degree of a Node: Number of subtrees of a given node.
Example: Degree of A = 3, Degree of E = 2
Degree of a Tree: Maximum degree of a node in a tree.
Example: Degree of above tree = 3
Depth or Height: Maximum level number of a node + 1(i.e., level number of
farthest leaf node of a tree + 1).
Example: Depth of above tree = 3 + 1= 4
Non-terminal Node: Any node except root node whose degree is not zero.
Forest: Set of disjoint trees.
Siblings: D and G are siblings of parent Node B.
Path: Sequence of consecutive edges from the source node to the destination
node.
Internal nodes: All nodes those have children nodes are called as internal
nodes.
Leaf nodes: Those nodes, which have no child, are called leaf nodes.
The depth of a node is the number of edges from the root to the node.
The height of a node is the number of edges from the node to the deepest
leaf.
The height of a tree is the height of the root.

Trees can be used

for underlying structure in decision-making algorithms


to represent Heaps (Priority Queues)

https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 7/12
12/5/2018 IBPS (SO) I.T.Officer : Data Structure Study Notes

to represent B-Trees (fast access to database)


for storing hierarchies in organizations
All Exams STORE PRACTICE SEARCH

for le system

Binary Tree:
A binary tree is a tree like structure that is rooted and in which each node has at
most two children and each child of a node is designated as its left or right child. In
this kind of tree, the maximum degree of any node is at most 2.

A binary tree T is de ned as a nite set of elements such that

T is empty (called NULL tree or empty tree).


T contains a distinguished Node R called the root of T and the remaining
nodes of T form an ordered pair of disjoint binary trees T 1 and T 2 .

Any node N in a binary tree T has either 0, 1 or 2 successors. Level l of a binary tree
T can have at most 2 l nodes.

Number of nodes on each level i of binary tree is at most 2 i


The number n of nodes in a binary tree of height h is atleast n = h + 1 and
atmost n = 2 h+1 – 1, where h is the depth of the tree.
Depth d of a binary tree with n nodes >= oor(lg n)
d = oor(lg N) ; lower bound, when a tree is a full binary tree
d = n – 1 ; upper bound, when a tree is a degenerate tree.

Types of Binary Tree:

Binary search tree


Threaded Binary Tree
Balanced Binary Tree
B+ tree
Parse tree
AVL tree
Spanning Tree
Digital Binary Tree

https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 8/12
12/5/2018 IBPS (SO) I.T.Officer : Data Structure Study Notes

Graphs
STORE
A graph is aAll Exams
collection PRACTICE
of nodes called vertices, and the connections SEARCH
between them,
called edges.
Directed Graph: When the edges in a graph have a direction, the graph is called a
directed graph or digraph and the edges are called directed edges or arcs.
Adjacency: If (u,v) is in the edge set we say u is adjacent to v.
Path: Sequence of edges where every edge is connected by two vertices.
Loop: A path with the same start and end node.
Connected Graph: There exists a path between every pair of nodes, no node is
disconnected.
Acyclic Graph: A graph with no cycles.
Weighted Graphs: A weighted graph is a graph, in which each edge has a weight.
Weight of a Graph: The sum of the weights of all edges.
Connected Components: In an undirected graph, a connected component is a
subset of vertices that are all reachable from each other. The graph is connected if
it contains exactly one connected component, i.e. every vertex is reachable from
every other. Connected component is a maximal connected subgraph.
Subgraph: subset of vertices and edges forming a graph.
Tree: Connected graph without cycles.
Forest: Collection of trees
In a directed graph, a strongly connected component is a subset of mutually
reachable vertices, i.e. there is a path between every two vertices in the set.
Weakly Connected component: If the connected graph is not strongly connected
then it is weakly connected graph.
Graph Representations: There are many ways of representing a graph:

Adjacency List
Adjacency Matrix
Incidence list
Incidence matrix

“A man is great by deeds, not by birth.”


With just one week left for IBPS Clerk Prelim Exam, Gradeup has launched IBPS
Clerk VI Prelims Mock test Series consisting of 20 full-length online tests for you
to score better in upcoming IBPS Clerk Prelim Exam. The Test Pack consists of 20
High-Quality Practice Tests based on latest pattern for you to ace your exam.
Where the rst test for IBPS Clerk Prelim Exam is completely free and the
Individual complete Package can be purchase through below link:

https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 9/12
12/5/2018 IBPS (SO) I.T.Officer : Data Structure Study Notes

IBPS Clerk Prelim Online Mock Tests Package – Get Now


All Exams STORE PRACTICE SEARCH

Thanks,
GradeUp Team.

IBPS Clerk Combo 2018 based on Latest Pattern


Practice 30 Full Length Tests in Hindi & English, Get All India Rank
among thousands of aspirants

ATTEMPT TEST NOW

376 upvotes 384 comments Nov 21, 2016 - 18:0

Tags : Bank & Insurance IBPS-SO :: IT O cer Computer

Posted by:

Vijay Kumar
Nov 21 Bank & Insurance

Related Posts

IBPS (SO) I.T.O cer : Programming Study Notes


Nov 14 | 372 upvotes

IBPS IT O cer Professional Knowledge Tests Pack


Jan 2 | 215 upvotes

Professional Knowledge quiz for I.T.O cer Exams


Nov 21 | 8K+ attempts
10 Questions | 6 Minutes

Comments WRITE A COMMENT

Load previous comments

Kushal Joshi Sep 19


Pls send me it o ce notes at [email protected]
0 0

https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 10/12
12/5/2018 IBPS (SO) I.T.Officer : Data Structure Study Notes

Hari Sep 27
All Exams STORE PRACTICE SEARCH
Hi frnds..if u have it o cer notes pelese send to me .my mail id
[email protected]
0 1

Sandeep Kumar Oct 16


Please send me notes [email protected]
0 0

Udhayakumar M V Oct 22
please send IT O cer notes [email protected]
0 0

chandan Oct 24
Please send so/it notes at [email protected]
0 0

shivam gupta Oct 30


please send me all the notes related to IBPS SO IT o cer
[email protected]
Thank You
0 0

Manoj Shelana Nov 25


Can you please send me all the notes related to IBPS SO IT o cer at
[email protected]?
0 0

gayathri sainathan Dec 5


Can anyone help me how to prepare for SO-IT cause am preparing on my own. dont
know where to start , what to do?How to prepare for the interview?It will be more
helpful if someone guide me.Thank you in advance
0 0

Parveen Mittal Dec 31


plz send me notes to [email protected]
0 0

Ankita Parmar Jan 3


Can you send this material as pdf?
0 0

Write a comment

https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 11/12
12/5/2018 IBPS (SO) I.T.Officer : Data Structure Study Notes

All Exams STORE PRACTICE SEARCH


Our Apps Important Exams
Previous Year Question Papers IBPS PO
Online Test Series SBI Clerk 2018
NCERT Solutions SBI PO 2018
Gradeup School BOB Manipal PO
RBI Grade B
NICL AO
NIACL Assistant
IBPS RRB

Quick Links Test Series

IBPS PO Syllabus IBPS Clerk Test Series


IBPS Clerk Syllabus Bank All Exam Complete Pack
IBPS PO Result Other Bank Exams Pack
Daily GK Updates
Current Affairs
GK Current Affairs Quiz
Bank Exam Noti cations
Banking Online Course

GradeStack Learning Pvt. Ltd.

8 Square Building, 6th Floor,


Plot No. 8, Sector 125,
Noida, India - 201313

[email protected]

ABOUT US CONTACT US NEWS FAQ TERMS & CONDITIONS PRIVACY POLICY SITEMAP

AUTHORS

https://gradeup.co/ibps-so-i-t-officer-data-structure-study-notes-i-5406002a-b3bc-11e5-b245-f672ce3804fb 12/12

You might also like