Professional Documents
Culture Documents
DEPARTMENT: UIC
Bachelor of Computer Application
Subject Name: Data Structure
Code:CAT-201
2
SYLLABUS
DATA STRUCTURES L T P C
Total Contact Hours:45
CAT- 201 Applicable to which 3 0 0 3
branch: BCA
Prerequisite: Knowledge of Programming in C
Marks
Internal: 40 External: 60
Course Objective
To learn the systematic way of solving problems.
To introduce various techniques for representation of the data in the real world
To efficiently implement solutions for specific problems.
Unit Course Outcome
Student will be able to apply appropriate constructs of Programming language, coding standards for application
1.
development
2. Students will learn to Select and use appropriate data structures for problem solving and programming.
To implement Trees, Graphs and Select appropriate searching and/or sorting techniques for application development
3.
3
SYLLABUS
Unit-I
Introduction: Pointers and Dynamic memory allocation, Types of data structures, Mathematical
notation and functions.
Algorithm Analysis: Space Complexity, Time Complexity, Asymptotic Notation and Algorithmic
complexity. Abstract Data Type.
Arrays & Structure: Linear Search, Binary Search (Recursive & iterative, Evaluation of
Polynomial, Polynomial representation, Polynomial Addition).
Structures: Internal representation of structure, Self –referential structure
4
SYLLABUS
Unit-II
Stack: Memory Representation of Stacks via arrays and Linked List, Stack Operations, Application
of Stack.
Evaluation of Expression: Evaluation of postfix expression, Infix to postfix and prefix forms for
expressions.
Queue: Representation using array and linked List, Queue Operations, Types of queues,
Applications of queue.
Linked List: Representation of linked list, linked list operations (Create, Insertion, Printing,
Deleting and Traversing), Circular Linked List, Double linked list.
5
SYLLABUS
Unit-III
Trees: Definition, Terminology, Representation, Binary tree: Representation and its types, Traversal
(In-order, Pre-order, Post-order). Binary Search Tree, Heap, AVL/Height Balanced Tree
Graphs: Representation of Graphs, Adjacency Matrix and List, In degree, out degree of graph.
Graph operation: Depth First Search and Breath First Search.
Sorting: Bubble sort, Selection sort, Insertion sort, Quick Sort and Merge Sort
6
Course Outcome
CO Number Title Level
TREE CO2 Elaborate the operations which we can implement on tree data
structure.
Understand
7
TREE
• Tree represents the nodes connected by edges.
• Binary Tree is a special data structure used for data storage purposes. A binary tree has a special
condition that each node can have a maximum of two children.
• A binary tree has the benefits of both an ordered array and a linked list as search is as quick as in
a sorted array and insertion or deletion operation are as fast as in linked list.
8
IMPORTANT TERMS IN TREE
9
IMPORTANT TERMS IN TREE
• Visiting − Visiting refers to checking the value of a node when control is on the node.
• Traversing − Traversing means passing through nodes in a specific order.
• Levels − Level of a node represents the generation of a node. If the root node is at level 0, then its
next child node is at level 1, its grandchild is at level 2, and so on.
• keys − Key represents a value of a node based on which a search operation is to be carried out for
a node.
10
Binary search tree
Binary Search tree exhibits a special behavior. A node's left child must have a value less than its
parent's value and the node's right child must have a value greater than its parent value.
Fig 2 BST
Reference: https://www.tutorialspoint.com/data_structures_algorithms/tree.htm
11
TREE TRAVERSAL
Traversal is a process to visit all the nodes of a tree and may print their values too. Because, all
nodes are connected via edges (links) we always start from the root (head) node. That is, we cannot
randomly access a node in a tree.
There are three ways which we use to traverse a tree −
• In-order Traversal
• Pre-order Traversal
• Post-order Traversal
12
IN-ORDER TRAVERSAL
• In this traversal method, the left sub-tree is visited first, then the root and later the right sub-tree.
We should always remember that every node may represent a sub-tree itself.
• If a binary tree is traversed in-order, the output will produce sorted key values in an ascending
order.
• We start from A, and following in-order traversal, we move to its left sub-tree B. B is also
traversed in-order. The process goes on until all the nodes are visited. The output of in-order
traversal of this tree will be −
• D→ B →E →A→ F→ C →G
13
PRE-ORDER TRAVERSAL
• In this traversal method, the root node is visited first, then the left subtree and finally the right
subtree.
• We start from A, and following pre-order traversal, we first visit A itself and then move to its left
subtree B. B is also traversed pre-order. The process goes on until all the nodes are visited. The
output of pre-order traversal of this tree will be −
• A→B→D→E→C→F→G
Fig 4 pre-order
https://www.tutorialspoint.com/data_structures_algorithms/tree_traversal.htm
Traversal
14
POST-ORDER TRAVERSAL
In this traversal method, the root node is visited last, hence the name. First we traverse the left sub-
tree, then the right sub-tree and finally the root node.
We start from A, and following pre-order traversal, we first visit the left sub-tree B. B is also
traversed post-order. The process goes on until all the nodes are visited. The output of post-order
traversal of this tree will be −
D→E→B→F→G→C→A
https://www.tutorialspoint.com/data_structures_algorithms/tree_traversal.htm
15
TREE APPLICATIONS
Trees and their variants are an extremely useful data structure with lots of practical applications.
Binary Search Trees(BSTs) are used to quickly check whether an element is present in a set or not.
Heap is a kind of tree that is used for heap sort
16
REFERENCES
Reference Books:
• Seymour Lipschutz, Schaum's Outlines Series Data structures TMH
• Introduction to Data Structures Applications, Trembley&Soreson, Second Edition, Pearson
Education
Reference websites:
• https://www.tutorialspoint.com/data_structures_algorithms
17
THANK YOU
For queries
Email: gurpreetkaur.uic@cumail.in