Solution: Dynamic Programming
Solution to the coding-based question related to dynamic programming.
We'll cover the following...
Let's practice what we have learned so far.
Task
Imagine you’ve just been appointed as the new organizer of the first annual mandatory holiday party at Giggle (a subsidiary of Abugida). Giggle employees are organized into a strict hierarchy—a tree with the company president at the root. The all-knowing oracles in Human Resources have assigned a real number to each employee measuring how “fun” the employee is. To keep things social, there is one restriction on the guest list: an employee cannot attend the party if their immediate supervisor is also present. On the other hand, the president of the company must attend the party, even though she has a negative fun rating; it’s her company, ...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy