SINCE I CAN NOT CHANGE THE POINT TO THE QUESTION, SO I REPEAT POST THIS QUESTION
ID: 654036 • Letter: S
Question
SINCE I CAN NOT CHANGE THE POINT TO THE QUESTION, SO I REPEAT POST THIS QUESTION NINE TIMES, IF YOU CAN ANSWER THIS QUESTION I GIVE 2700 POINTS IN TOTAL, JUST COPY AND PASTE UNDER EACH QUESTION.
You should expect to learn about: (i) the experimental performance of algorithms and why it may not match the theoretical bound at times, and (ii) how to tackle problems for which there is no context as opposed to book problems that are tied to specific chapters so you immediately know which technique to try. You will get three attempts to work on this problem using three different techniques (start with the simplest design technique first). We are interested in your thought process so even failed attempts are important to document.Each time you must: 1. State the technique you are using 2. Explain your idea first in words with appropriate examples (not code) 3. If the idea fails, show examples on which it fails 4. If the idea succeeds, write algorithm in pseudo-code notation and then program it, test it, and turn in your test cases and the documented program along with instructions on how to compile and run it. Also analyze the time and space complexity of the algorithm, again if the idea succeeds.
Question: 1. ( USE 2 DIFFERENT METHODS,WHICH MEANS REPEAT WHOLE PROCESS AGAIN. based on 4 steps as mention, notice that i need the program code and anlalyzing how it works. I need the complete program and the analysis of algorithm for different value.)
Given the hierarchy of a company (in the form of a tree) and a number k of people to be fired, you must find which k people must be fired to minimize the loss to the company. Each node of the tree represents an employee who has been assigned a value according to his worth to the company (a weight). All valuations are unique, positive integers (no node has the same weight). Before firing someone higher up, you must fire all their subordinates (you can only remove nodes with no children)
Explanation / Answer
use binary search tree
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.