I'd like a quotation for this assignment for my algorithms course. Proper code is not required, mostly pseudocode, runtime analysis along with detailed explanations for each question.
Submission by Nov 5th 6:00pm PT CS5800 Homework5 Requirements 1. Use greedy strategy wherever needed. 2. Note all edge cases 3. Solve for the questions asked 4. Be mindful of the variable names 5. Comment your pseudo code 6. Give runtimes in big O notation Problem 1 Minimum airport gates open (25pts) An airport has to decide the minimum number of gates to keep open depending on the schedules of flights arriving and departing at a given day. Given arrival and departure times of all flights, and the total number of available gates for that airport, on day X, give an algorithm that finds the minimum number of gates to keep open for that day. No flight should be kept waiting. Provide time and space complexities. (25pts) Problem 2 Find if present (25 pts) A binary tree is constructed with the following rules Now the binary tree is polluted, in that all treeNode.val have been changed to -1 Write a function FindIfPresent that takes a value and the polluted tree and returns True if and only if the value is present in the recovered tree. Provide time and space complexities. class TreeNode(object): def __init__(self, val=None, left=None, right=None): self.val = val self.left = left self.right = right root.val = 0 If treeNode.val == x and treeNode.left != null, then treeNode.left.val == 2 * x + 1 If treeNode.val == x and treeNode.right != null, then treeNode.right.val == 2 * x + 2 -1 0 / \ recovered to / \ -1 -1 1 2 / \ / \ -1 -1 3 4 Problem 3 Sell stocks (25pts) Mark wants to know how much money he could have made yesterday if he had been trading Amazon stocks all day! So he looked at the volatility of Amazon stock prices from yesterday and put them in an array of tuples called : AmznPrices AmznPrices = [ (time1, price1), (time2, price2), (time3, price3)…. (timen, pricen) ] Where time1, time2… timen are the number of minutes past the opening time. If the opening time is 9:00am EST, and time1 = 30, then it refers to 9:30 am EST. price1, price2…., pricen : is the price for one share of Amazon stock at that time. Write an efficient method that takes AmznPrices and returns the best profit Mark could have made from one purchase and one sale of one share of Amazon stock yesterday. Think of all edge cases!! Provide time and space complexity of your algorithm Problem 4 Best Party (25 pts) It’s Natalie’s birthday and she decides to host the best party ever. She puts together a list of her n friends. She also knows which of her friends knows whom and she decides to use this info to design an awesome social party. Natalie decides it would be best to invite the maximum number of friends possible with following constraints. At the party, each person should know at least 4 people and they should also NOT know at least 4 people. Design an efficient algorithm that takes the list of n people and the list of pairs who know each other and outputs the best choice of party invitees. Provide the time and space complexity of your algorithm. Requirements Problem 1 Minimum airport gates open (25pts) Problem 2 Find if present (25 pts) Problem 3 Sell stocks (25pts) Problem 4 Best Party (25 pts)