Answer:
C. USB
Explanation:
A USB Disk allows for a Backup of the PowerPoint file in case Jack needs it in the future.
If it stores any type of objects mixed, use Object as storage class. All classes inherit from Object and for primitives use their respective wrapper classes. Or just use one of the bazillion container classes that already exist.
Answer: DAP stands for directory access protocol .It is a protocol that is used for accessing the information from the directory of X.500 protocol.
LDAP(Lightweight directory access protocol) is the software protocol that is present for the simplification process of the X.500 protocol and to make it light-weighted .It is basically a version of DAP in a lightweight form.
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: