Common mistakes Flashcards

1
Q

How to define mid while defining a binary sort() ?

A

mid = (start + end)/2 = start + (end - start)/2
vector<T> L = sort(array, start, mid)
vector<T> R = sort(array, mid + 1, end)</T></T>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly