Challenge: Dynamic Programming
Challenge yourself by solving a coding-based question related to dynamic programming.
We'll cover the following...
Let's practice what we have learned so far.
Task
We’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. ...