0% found this document useful (0 votes)
2 views1 page

Assignment 4 Data structure and algorithm 24_25

The document is an assignment for B.Tech. CST (II Sem) students at SAGE University Indore, focusing on Data Structures and Algorithms. It includes definitions of key terms related to trees, programming tasks for creating binary search trees, and tree traversal exercises. Students are required to submit their work in handwritten format.

Uploaded by

ransurmasumit11
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)
2 views1 page

Assignment 4 Data structure and algorithm 24_25

The document is an assignment for B.Tech. CST (II Sem) students at SAGE University Indore, focusing on Data Structures and Algorithms. It includes definitions of key terms related to trees, programming tasks for creating binary search trees, and tree traversal exercises. Students are required to submit their work in handwritten format.

Uploaded by

ransurmasumit11
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/ 1

SAGE, UNIVERSITY INDORE

INSTITUTE OF ADVANCE COMPUTING


COMPUTER SCIENCE & ENGINEERING- DEPARTMENT
Program Name : B.Tech. CST (II Sem) Section - B
Course Name & Code : Data Structure and Algorithm - ACTDCDSA001T
Session : 2024-25 (Jan-Jun)
Assignment No :4

Note: Attempt all questions; submit in separate Copy (in your own handwriting)

1. Define the following terms with examples:


a) Root e) Height of a Tree
b) Leaf Node f) Degree of a Node
c) Parent and Child g) Binary Search Tree
d) Siblings h) AVL tree

2. Write a program/algorithm to create a general binary search tree.

3. Write a program to create a binary search tree from the following elements:
[40, 20, 60, 10, 30, 50, 70]

4. Print the final tree structure using in-order traversal.

5. Given the following BST:


50
/ \
30 70
/ \ / \
20 40 60 80
Write the output of:
a) In-order traversal
b) Pre-order traversal
c) Post-order traversal

6. Construct the binary tree and draw its structure.


a) Tree traversals:
1. In-order: D B E A F C
2. Post-order: D E B F C A
b) Tree traversals:
1. In-order: D B E A F C
2. Pre-order: A B D E C F
- - - - - Good Luck - - - - - -

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy