sorting - Comparisons in merge-sort -
i have homework problem asking asymptotic worst case of comparisons merge-sort when sorting 0s , 1s.
this confusing me because looks merge-sort has same number of comparisons whatever placed in n elements. don't understand merge-sort. can enlighten me?
the worst case according me when 0's , 1's come alternatively , when total number of elements factor of 4. because merging takes max time because of this. way merge sort has o(nlogn)