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)


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -