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

Week 8 Nikhil

Uploaded by

KIRAN GIRIJALA
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Week 8 Nikhil

Uploaded by

KIRAN GIRIJALA
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment Overview

This assignment consists of three main parts:

1. Data Structure Implementation


2. Binary Tree Operations
3. Binary Search Tree (BST) Operations

Part 1: Data Structure Implementation


For this part, you will work with the data from the provided spreadsheet: country-
population.xlsx.
Tasks:

1. Choose a data structure to store the spreadsheet data.


2. Write 1-2 paragraphs explaining why you chose that particular data structure over
others covered in the course.
3. Explain the challenges you faced while working with the chosen structure and
how you overcame them.
4. Implement a sorting algorithm of your choice to sort the data, and explain your
algorithm in a paragraph.

Part 2: Binary Tree Operations


Using the following list of keys:

keys = [6, 20, 245, 38, 27, 43, 3, 9, 82, 10, 2, 56, 9, 11]

Tasks:

1. Insert the keys into a Binary Tree.


2. Perform and display the results of:
o In-order traversal
o Pre-order traversal
o Post-order traversal

Expected output format:

In-order Traversal: [11, 56, 10, 9, 9, 2, 43, 82, 38, 3, 20, 27, 6, 245]

Pre-order Traversal: [6, 20, 38, 43, 9, 10, 56, 11, 9, 2, 82, 3, 27, 245]

Post-order Traversal: [11, 56, 9, 10, 2, 9, 82, 43, 3, 38, 27, 20, 245, 6]

Part 3: Binary Search Tree (BST) Operations


Using the same list of keys as in Part 2:
Tasks:
1. Create a Binary Search Tree (BST).
2. Perform and display the results of:
o In-order traversal
o Search for key 43
o Search for key 90
o Search for key 82

Expected output format:

In-order Traversal: [2, 3, 6, 9, 10, 11, 20, 27, 38, 43, 56, 82, 245]

Search 43: 43

Search 90: None

Search 82: 82

Tasks:
Submit these three assignments in 3 separate files.
This assignment will help you demonstrate your understanding of various data structures,
binary trees, and binary search trees, as well as your ability to implement and explain
algorithms for working with these structures.

You might also like