COMP90038 Algorithms and Complexity Assignment 2 Solution - 2018
VerifiedAdded on 2023/06/04
|9
|2414
|194
Homework Assignment
AI Summary
This document provides solutions to a COMP90038 Algorithms and Complexity assignment. The first problem involves constructing a valid AVL tree from a given data sequence, demonstrating the insertion steps. The second problem presents two FindSetIntersection algorithms: one based on pre-sorting (O(n log n) complexity) and the other utilizing hashing (O(n) complexity). The third problem addresses an employee communication scenario at Sloppy Inc., requiring the design of an efficient algorithm (with time complexity analysis) to determine the minimum number of days for decision dissemination in a hierarchical structure represented as an n-ary tree. The final problem involves array manipulation, specifically finding the minimum j such that A[j] > A[i] and j > i, with solutions provided for both O(n^2) and O(n log n) complexities. The solution utilizes AVL trees and inorder successor to find the required element.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
1 out of 9