Problem:
Question 1- Write an assembly code to sum up the values in an array.
Question 2- Suppose you are organizing a company party. The corporation has hierarchical ranking structure, that is, the CEO is the root node of the hierarchy tree, and the CEO's immediate subordinates are the children of the root node, and so on in this fashion. To keep the party fun for all involved, you will not invite any employee whose immediate superior is invited. We want to invite as many employees as possible for headcount purposes. Give a greedy algorithm for this problem, analyze its running time, and prove it is correct.
Write the code step by step and explain it.