2 votes 2 votes To merge 2 files of size m and n it takes m + n time What will be the optimal time Complexity to merge the files of size 10, 15, 40, 70, 75 and 80? Algorithms algorithms merging numerical-answers + – Ali Jazib Mahmood asked Aug 18, 2017 • retagged Jul 7, 2022 by Lakshman Bhaiya Ali Jazib Mahmood 1.4k views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments Tesla! commented Aug 18, 2017 reply Follow Share Wait I will post answer 0 votes 0 votes Tesla! commented Aug 18, 2017 reply Follow Share @Ali Jazib Mahmood you are correct 0 votes 0 votes smsubham commented Feb 26, 2018 reply Follow Share good read: https://xlinux.nist.gov/dads/HTML/optimalMerge.html 0 votes 0 votes Please log in or register to add a comment.
Best answer 3 votes 3 votes total time would be 25+65+135+155+290=670 some similar reference:https://www.tutorialspoint.com/design_and_analysis_of_algorithms/design_and_analysis_of_algorithms_optimal_merge_pattern.htm https://gateoverflow.in/1997/gate2014-2-38 Tesla! answered Aug 18, 2017 • selected Aug 19, 2017 by Ali Jazib Mahmood Tesla! comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes i think it will be 290 sh2mohit111 answered Sep 10, 2017 sh2mohit111 comment Share Follow See all 0 reply Please log in or register to add a comment.