Project Report - National University of Technology
Document Details
Uploaded by Deleted User
Daejeon National University of Technology
Muhammad Haseeb, Muhammad Waqas, Muhammad Hamza Ilyas
Tags
Summary
This project report details the implementation of several tree data structures, including binary trees, binary search trees, and AVL trees. The report covers the design and implementation choices, challenges faced, and possible solutions.
Full Transcript
**National University of Technology** **Muhammad Haseeb** **F23608065** -------------------------- --------------- **Muhammad Waqas** **F23608050** **Muhammad Hamza Ilyas** **F23608059** -- -- -- -- -- -- 1. **Muhammad Haseeb**: - Designed and implemented...
**National University of Technology** **Muhammad Haseeb** **F23608065** -------------------------- --------------- **Muhammad Waqas** **F23608050** **Muhammad Hamza Ilyas** **F23608059** -- -- -- -- -- -- 1. **Muhammad Haseeb**: - Designed and implemented the header file containing the Binary Tree. - Developed the main program to test the functionality of the Binary Tree. - Conducted debugging and optimization of the code. 2. **Muhammad Waqas**: - Designed and implemented the header file containing the Binary Search Tree. - Developed the main program to test the functionality of the Binary Search Tree. - Conducted debugging and optimization of the code. 3. **Muhammad Hamza Ilyas**: - Designed and implemented the header file containing the AVL Tree. - Developed the main program to test the functionality of the AVL Tree. - Conducted debugging and optimization of the code. - **Binary Tree**: Supports basic traversals (in-order, pre-order, post-order). - **Binary Search Tree**: Includes insertion, deletion, and search operations with ordered node placement. - **AVL Tree**: Enhances the BST with self-balancing properties to ensure O(log n) performance for operations. 1. **Challenge**: Handling balancing in the AVL Tree during insertion.\ **Solution**: Implemented left and right rotation algorithms for rebalancing based on the height difference. 2. **Challenge**: Managing memory to avoid leaks.\ **Solution**: Used smart pointers and carefully destructed dynamic memory allocations. 3. **Challenge**: Debugging segmentation faults.\ **Solution**: Used step-by-step debugging and visualization tools like GDB to trace errors. 1. \"Introduction to Algorithms\" by Cormen, Leiserson, Rivest, and Stein. 2. Online tutorials on AVL Tree implementation from GeeksforGeeks. 3. C++ documentation for STL and dynamic memory management. **The End**