Its 10, value always has to be positive.
Answer:
(11n-5) / 12 is correct answer.
Explanation:
The Probability that key will match to nth term = 1/2
The Probability that key will match to n-1th term = 1/3
As all other probabilities are equal
The Total Probability that key matches to any of 1 to n-2 index = 1 - 1/2 - 1/3 = 1/6
The Probability that key matches to any of 1 to n-2 index = (1/6) / n-2 = (1/6)* (n-2))
Let P(i) = Probability that key matches to ith index.
The Average time complexity = 22 i=1 P(i) * i
The Average time complexity = 1/(6(n-2) * ( sum of 1 to n-2 ) + (n-1) / 3 + n/2
The Average time complexity = 1/(6(n-2) * ( n-2)*(n-1) / 2 + ( n-1) / 3 + n/2
The Average time complexity = 1/6 * (n-1)/2 + (n-1)/3 + n/2
The Average time complexity = (n-1)/12 + (n-1)/3 + n/2
The Average time complexity = (n-1 + 4 * n - 4 * 1 +6 * n)/12
The Average time complexity = 11n-5 / 12
so (11n-5) / 12 is correct answer.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The value stored by a variable can be changed after it is assigned(true).
The value of a variable can be changed after it is assigned, for example:
int a=10;
and we can change the value of variable a in letter program such as:
a=15;
Variables are a name for a spot in the computer's memory (true).
it is true, because the variables value stored in the computer's memory and we can access theses values by their name (variable name). so Variables are a name for a spot in the computer's memory.
Variable names can be words: such as temperature or height (true).
Yes, the variable name can be words such as height, width, temperature etc.
The value stored by a variable cannot be changed after it is assigned (false).
It is noted that the value stored by a variable can be changed after it is assigned. However, it is noted that is some programming language, you can't change the value of static variable.
That is an interactive question.