Back to Browse

Data Structure 3 - Selection Sort Algorithm Simulation C++ Code in Bangla - বাংলা

5.9K views
Apr 25, 2017
9:55

Sayef Reyadh - Programming Made Simple https://sayefreyadh.blogspot.com/2018/06/selection-sort-algorithm-simulation-c.html In computer science, selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, making it inefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is noted for its simplicity, and it has performance advantages over more complicated algorithms in certain situations, particularly where auxiliary memory is limited. The algorithm divides the input list into two parts: the sublist of items already sorted, which is built up from left to right at the front (left) of the list, and the sublist of items remaining to be sorted that occupy the rest of the list. Initially, the sorted sublist is empty and the unsorted sublist is the entire input list. The algorithm proceeds by finding the smallest (or largest, depending on sorting order) element in the unsorted sublist, exchanging (swapping) it with the leftmost unsorted element (putting it in sorted order), and moving the sublist boundaries one element to the right. Selection sort is not difficult to analyze compared to other sorting algorithms since none of the loops depend on the data in the array. Selecting the lowest element requires scanning all n elements (this takes n − 1 comparisons) and then swapping it into the first position. Finding the next lowest element requires scanning the remaining n − 1 elements and so on, for (n − 1) + (n − 2) + ... + 2 + 1 = n(n - 1) / 2 ∈ Θ(n2) comparisons (see arithmetic progression).[1] Each of these scans requires one swap for n − 1 elements (the final element is already in place). 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 3 - Selection Sort Algorithm Simulation C++ Code in Bangla - বাংলা | NatokHD