merge sort algorithm
0 Answers
merge sort algorithm
| Flag | PURGE
Given an array A[1..n] and a key x, n = 3k 1. If Pr(xA) = 3
8
and, if x is in A, the
probability that x is in the first third of the array is three times more likely for x to be in the
second third of the array, and the probability that x is in the second third of the array is twice
more likely for x to be in the last third of the array. Furthermore, if x is in any third part of the
array, x is equally likely to be found in any one of the positions in that part of the array. Based
on the number of comparisons, compute Ta(n) if sequential search is performed on A for x.
You must set up the equation for Ta(n) and then evaluate the sums. Do not simplify your
expression
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
- Anonymous April 13, 2017