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

2022Algorithm1Tutorial5

The document is a tutorial for CS21003 Algorithms I, focusing on AVL trees and binary search trees. It includes tasks such as proving the maximum height of an AVL tree and the average depth of a binary search tree, as well as questions regarding the uniqueness of binary tree definitions based on different traversal methods. Additionally, it requires designing an algorithm to find the k-th smallest/largest element in a binary search tree.

Uploaded by

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

2022Algorithm1Tutorial5

The document is a tutorial for CS21003 Algorithms I, focusing on AVL trees and binary search trees. It includes tasks such as proving the maximum height of an AVL tree and the average depth of a binary search tree, as well as questions regarding the uniqueness of binary tree definitions based on different traversal methods. Additionally, it requires designing an algorithm to find the k-th smallest/largest element in a binary search tree.

Uploaded by

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

Tutorial 5: CS21003 Algorithms I

Prof. Partha Pratim Chakrabarti and Palash Dey


Indian Institute of Technology, Kharagpur

February 17, 2022

1. Show that the maximum height of an n-node AVL tree is O(log n).
2. Show that the average depth of a node in an n-node binary search tree is O(log n).

3. (a) Do in-order and pre-order traversals define a binary tree uniquely? If yes, then write an
algorithm; otherwise provide counter-example.
(b) Do post-order and pre-order traversals define a binary tree uniquely? If yes, then write an
algorithm; otherwise provide counter-example.
(c) Do in-order and post-order traversals define a binary tree uniquely? If yes, then write an
algorithm; otherwise provide counter-example.
4. Design an algorithm to find the k-th smallest/largest algorithm in a binary search tree.

You might also like