Question: Question # 2 - Complexity Analysis, Recursion, Searching 1 0 marks ] a ) You have been given a set of numbers in an array
Question # Complexity Analysis, Recursion, Searching marks
a You have been given a set of numbers in an array and have been asked to compute the sum of the squares of the numbers given. Eg given the following: your answer should compute the following obtaining the result Write a recursive solution to this problem using either Java or
b Discuss the concept of linear search and binary search. State the BigO notation for both.
c State the BigO notation for each of the for loops below:
d Order your results for above, from the most efficient to the least efficient.
Question # Trees & Sorting marks
a Given the set of numbers: Construct the resulting Binary Search Tree BST
b Perform a PreOrder and a PostOrder traversal of the binary search tree above.
c Discuss the issue that an AVL tree solves and state how it solves the issue.
d Use the numbers: to construct an AVL tree. Be sure to identify the rotations which are performed as well as the reason for each rotation
e Given a list containing: Show how the selection sort changes the list during the first iterations
f Given a list containing: Show how the bubble sort changes the list during the first iterations
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
