In python:
i = 1
lst1 = ([])
lst2 = ([])
while i <= 5:
person1 = int(input("Enter the salary individual 1 got in year {}".format(i)))
person2 = int(input("Enter the salary individual 1 got in year {}".format(i)))
lst1.append(person1)
lst2.append(person2)
i += 1
if sum(lst1) > sum(lst2):
print("Individual 1 has the highest salary")
else:
print("Individual 2 has the highest salary")
This works correctly if the two individuals do not end up with the same salary overall.
Go here this should help bunches!
http://www.microsoft.com/security/online-privacy/safely-dispose-computers-and-devices.aspx
Hope this website helps!
The “Allow changes by more than
one user at the same time” option.
In a
group of users, it is very important to create a shared workbook so that
several people are able to update information and track changes in the workbook
at the same time. To do so, one should click on the review tab of the excel sheet and select
share workbook. On the editing tab of the share workbook dialog box, select the
Allow changes by more than one user at the same time check box. Go ahead and
click the advanced tab and select option you would want to use and then click
OK
Answer:
Each time you insert a new node, call the function to adjust the sum.
This method has to be called each time we insert new node to the tree since the sum at all the
parent nodes from the newly inserted node changes when we insert the node.
// toSumTree method will convert the tree into sum tree.
int toSumTree(struct node *node)
{
if(node == NULL)
return 0;
// Store the old value
int old_val = node->data;
// Recursively call for left and right subtrees and store the sum as new value of this node
node->data = toSumTree(node->left) + toSumTree(node->right);
// Return the sum of values of nodes in left and right subtrees and
// old_value of this node
return node->data + old_val;
}
This has the complexity of O(n).
Explanation: