Sam
Sam

Reputation: 1

Median of medians algorithm: why divide the array into blocks of size 5 what if we divide into group of 4 is this effect time complexity

i was little confuse to make recursion (T) what if we divide the array (n/4). and why it is always recommended to use odd division of array why specifically 5. when we divide into 5 the recursion is like this T(n) <= theta(n) + T(n/5) + T(7n/10)

what will be the recursion (T) of this and is it effect time complexity as well because when we divide the array into (n/5) the time complexity is theta(n).

Upvotes: 0

Views: 64

Answers (0)

Related Questions