Answer:
1 1
Explanation:
First we have funny = 7 and serious = 15 .Then after that remainder when serious is divided by 2 is stored in funny that is 1.if condition will be false because funny is equal to 1.else if condition will also be false because it is not 2.So else will be executed and funny =1 and serious =1.
Output=1 1
Answer:
See explaination
Explanation:
class YourSimpleLinkedList<E> extends SimpleLinkedList<E> {
public boolean search(E value) {
if (value == null)
throw new IllegalArgumentException();
Item temp = start;
while (temp != null) {
if (temp.value.equals(value))
return true;
temp = temp.next;
}
return false;
}
}
Answer:
Algorithm C is chosen
Explanation:
<u>For Algorithm A </u>
T(n) = 5 * T ( n/2 ) + 0(n)
where : a = 5 , b = 2 , ∝ = 1
attached below is the remaining part of the solution