Back to Browse

Data Structure 5 - Merge Sort Algorithm Simulation C++ Code in Bangla - বাংলা

7.4K views
Apr 28, 2017
11:10

Sayef Reyadh - Programming Made Simple https://sayefreyadh.blogspot.com/2018/06/merge-sort-algorithm-simulation-c-code.html In computer science, merge sort (also commonly spelled mergesort) is an efficient, general-purpose, comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the implementation preserves the input order of equal elements in the sorted output. Mergesort is a divide and conquer algorithm that was invented by John von Neumann in 1945. A detailed description and analysis of bottom-up mergesort appeared in a report by Goldstine and Neumann as early as 1948. Conceptually, a merge sort works as follows: Divide the unsorted list into n sublists, each containing 1 element (a list of 1 element is considered sorted). Repeatedly merge sublists to produce new sorted sublists until there is only 1 sublist remaining. This will be the sorted list. In sorting n objects, merge sort has an average and worst-case performance of O(n log n). If the running time of merge sort for a list of length n is T(n), then the recurrence T(n) = 2T(n/2) + n follows from the definition of the algorithm (apply the algorithm to two lists of half the size of the original list, and add the n steps taken to merge the resulting two lists). The closed form follows from the master theorem. In the worst case, the number of comparisons merge sort makes is equal to or slightly smaller than (n ⌈lg n⌉ - 2⌈lg n⌉ + 1), which is between (n lg n - n + 1) and (n lg n + n + O(lg n)). Follow Me At : Facebook : https://www.facebook.com/Sayef.Reyadh.Khan Blog : http://sayefreyadh.blogspot.com/ Google : [email protected] Instagram : Hashtag.sayef Twitter : SayefReyadhKhan LinkedIn : https://www.linkedin.com/in/sayefreyadhkhan Github : https://github.com/SayefReyadh/ For any Q/A please comment below. And Please Do Subscribe and tell me your thoughts on which topic I should cover next :) *** ANTI-PIRACY WARNING *** This content is Copyright to Sayef Reyadh. Any unauthorized reproduction, redistribution or re-upload is strictly prohibited of this material. Legal action will be taken against those who violate the copyright of the following material presented! Thank You. Copyright @ Sayef Reyadh. All rights are Reserved. Fair Use of International. This channel may use some copyrighted materials without specific authorization of the owner but contents used here falls under the “Fair Use” Copyright Disclaimer under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use. Fair Use of Bangladesh. This channel may use some copyrighted materials without specific authorization of the owner but contents used here falls under the “Fair Use” as described in The Copyright Act 2000 Law No. 28 of the year 2000 of Bangladesh under Chapter 6, Section 36 and Chapter 13 Section 72. According to that law allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use. #SayefReyadh #DataStructureBanglaTutorial #SortingAlgorithmBanglaTutorial

Download

0 formats

No download links available.

Data Structure 5 - Merge Sort Algorithm Simulation C++ Code in Bangla - বাংলা | NatokHD