Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Selection sort


Related Topics

In the News (Tue 1 Dec 09)

  
  Selection Sort
Selection sort is probably the simplest sorting algorithm to implement so it can be blazingly fast on short arrays.
The idea of selection sort is rather simple: we repeatedly find the next largest (or smallest) element in the array and move it to its final position in the sorted array.
The implementation of the selection sort algorithm in C, together with a driver program is shown in Figure 10.6.
www.softpanorama.org /Algorithms/Sorting/selection_sort.shtml   (1463 words)

  
 Cprogramming.com - Algorithms - Insertion Sort and Selection Sort
Selection sort is the most conceptually simple of all the sorting algorithms.
It works by selecting the smallest (or largest, if you want to sort from big to small) element of the array and placing it at the head of the array.
Because a selection sort looks at progressively smaller parts of the array each time (as it knows to ignore the front of the array because it is already in order), a selection sort is slightly faster than bubble sort, and can be better than a modified bubble sort.
www.cprogramming.com /tutorial/computersciencetheory/sorting2.html   (327 words)

  
 Sorting
Selection sort maintains a growing `front' section of the array which is (i)sorted and (ii)less than the remainder of the array.
select smallest ------- a: 1 2 3 6 5 4 ------- ^ sorted
Selection sort is not stable, the is the relative order of equal keys is sometimes changed.
www.csse.monash.edu.au /~lloyd/tildeAlgDS/Sort   (237 words)

  
 Selection Sort Algorithm by Ryan S. Oshiro
The selection sort algorithm is one of the easiest known algorithms in the world, it is a beginning algorithm which many computer science students must know in their earlier courses.
The origins of the selection sort algorithm are a mystery mostly because it is a very simple algorithm and could go back to the Renaissance age, to the ancient Greek mathematicians or even the ancient Egyptians.
Selection Sort is worth teaching to beginning computer science students because it is a simple algorithm and it gives students a good base to understanding how algorithms work.
www2.hawaii.edu /~ryanoshi/SelectionSort.html   (935 words)

  
 PlanetMath: selection sort
Thus the selection sort algorithm is a very simple, in-place sorting algorithm.
This algorithm is very similar to the insertion sort algorithm.
This is version 2 of selection sort, born on 2001-10-08, modified 2004-04-27.
www.planetmath.org /encyclopedia/SelectionSort.html   (220 words)

  
 The Selection Sort Algorithm   (Site not responding. Last check: 2007-10-28)
The selection sort algorithm is one of the early and simple sorting algorithms that were developed around the time of the first computers.
The idea behind the sorting method is that you will initially scan through all of the number in the given list of numbers and search for the smallest number in that list and swap it with the first number.
But when one would pick the selection sort algorithm, you could probably use the insertion sort, or the quick sort algorithm insead and it would be better.
www2.hawaii.edu /~rtoshi/Ssort.htm   (1218 words)

  
 PlanetMath: selection sort
Thus the selection sort algorithm is a very simple, in-place sorting algorithm.
This algorithm is very similar to the insertion sort algorithm.
This is version 2 of selection sort, born on 2001-10-08, modified 2004-04-27.
planetmath.org /encyclopedia/SelectionSort.html   (220 words)

  
 Selection Sort
The selection sort works by selecting the smallest unsorted item remaining in the list, and then swapping it with the item in the next position to be filled.
The selection sort is the unwanted stepchild of the n
A sample C program that demonstrates the use of the selection sort may be downloaded here.
linux.wku.edu /~lamonml/algor/sort/selection.html   (196 words)

  
 Selection sort - Wikipedia, the free encyclopedia
Selection sort is a sorting algorithm, a comparison sort that works as follows:
Selection sort can be implemented as a stable sort.
A bidirectional variant of selection sort, called shaker sort, is an algorithm which finds both the minimum and maximum values in the list in every pass.
en.wikipedia.org /wiki/Selection_sort   (254 words)

  
 Selection Sort
Selection sort is among the simplest of sorting techniques and it work very well for small files.
The Selection sort spends most of its time trying to find the minimum element in the "unsorted" part of the array.
Bubble sort "selects" the maximum remaining elements at each stage, but wastes some effort imparting some order to "unsorted" part of the array.
www.personal.kent.edu /~rmuhamma/Algorithms/MyAlgorithms/Sorting/selectionSort.htm   (334 words)

  
 AlphaSort: A Cache-Sensitive Parallel External Sort
Traditionally, detached key sorts have been used for complex keys where the cost of key extraction and conditioning is a significant part of the key comparison cost [21].
Otherwise, use a key-prefix sort where the prefix is a good discriminator of the keys, and where the pointer and prefix are cache line aligned.
A two-pass sort uses less memory, but uses twice the disk bandwidth since intermediate runs must be written out to scratch disks during the input phase, and read back during the output phase.
research.microsoft.com /barc/SortBenchmark/AlphaSort.html   (8095 words)

  
 [warebiz] :: Programming - Articles - Techniques for Sorting Arrays
Sometimes, a programmer will want to directly sort the elements in an array using a selection or bubble sort, but there may be times when he needs to keep the actual array in tact and use a "tagged" array to store the correct positioning of the array when it is sorted.
While the selection sort, bubble sort, and tag sort are used to sort individual arrays, the merge sort is used to combine two sorted arrays into a third array.
The sort continues to compare the elements of both arrays until the end of one of the arrays is reached.
warebizprogramming.com /articles/sorting.htm   (2453 words)

  
 SparkNotes: Select Sort: The Selection Sort Algorithm
Unlike other quadratic tests, the efficiency of selection sort is independent of the data.
Bubble sort, for example, can sort sorted and some nearly-sorted lists in linear time because it is able to identify when it has a sorted list.
Selection sort does not do anything like that because it is only seeking the minimum value on each iteration.
www.sparknotes.com /cs/sorting/select/section1.html   (318 words)

  
 selection sort Definition: TechEncyclopedia from TechWeb   (Site not responding. Last check: 2007-10-28)
It then compares the rest of the list for the next-lowest item and places it in the #2 position and so on until all items are in the required order.
Selection sorts perform numerous comparisons, but fewer data movements than other methods.
It copies each matching item to a new file so that the selected items are in the same sequence as the original data.
www.techweb.com /encyclopedia/defineterm.jhtml?term=selection+sort   (332 words)

  
 PHP: Selection Sort Algorithm And Goldberg Variations On It. Schwartzian Transform. Bingo Sort.
A selection sort is an algorithm (the simplest of its kind, not the more efficient) whose purpose, as its name suggests, is that of scanning and sorting incoming data after an order - traditionally from the smaller to the bigger (whence we could already hint a variation: from the bigger to the smaller).
Please note that all sorts introduce an order within the (arguably) disordered incoming data, but such order does not exist as dictated by natural or cosmic laws: all orders are orders imposed by implicitly presumed look up tables that determine what comes before what, and what comes after what accordingly to a mere convention.
For this reason, bingo sort is regarded nothing less than the most efficient algorithm at tasks like, for instance, sorting out mails by zip codes (because arguably several mails share identical zip codes) in small counties or towns (that is: not exceedingly long array, with probably several repetitions of each value in it).
www.unitedscripters.com /phps/selectionsort.html   (3609 words)

  
 BrainJar.com: Table Sort
A selection sort works like this: starting with the entire list of items, you find the smallest one.
This process will work well for sorting the table rows because moving an item involves two actions, removing it (the row node) from the list (table section node) and then inserting it back at a specific location.
// Sort the rows based on the content of the specified column // using a selection sort.
www.brainjar.com /dhtml/tablesort/default5.asp   (781 words)

  
 Selection Sort Algorithm   (Site not responding. Last check: 2007-10-28)
The basic algorithm for a selection sort that sorts in descending order is to find the biggest element in the array, and then swap it with the first element in the array.
After the top of the array is sorted, then keep doing the same for the rest of the array until you are through the array.
One way to help you remember the selection sort is to notice that this algorithm goes through the entire array before switching anything.
amath.colorado.edu /courses/2710/2003Sum/module10/selalg.html   (205 words)

  
 Computer Science 111 -- Lab 9 -- Page 2
Selection sort is most commonly used in alphabetizing lists -- you have most likely alphabetized a list at some point by scanning through it repeatedly, finding the item that goes next in order on each scan.
You will note that the principle behind bubble sort and selection sort is the same: repeatedly find the next element in sorted order, starting with the largest, and put it where it belongs.
The main difference is that bubble sort does this by repeatedly exchanging neighboring items while moving down the list and selection sort does it by scanning down the list to find the next largest item and then putting that item where it belongs.
www.cs.princeton.edu /courses/archive/fall97/cs111/labs/sorting/2.html   (888 words)

  
 Selection Sort
In a selection sort, the first element of the array is selected as an anchor, to which all other elements are compared.
This selection of an anchor element is where the name of the sort comes from.
To sort the list in descending order, it is a simple matter of reversing the inequality sign that determines if a swap is needed.
www3.sympatico.ca /nithiya/SelectionSort.htm   (687 words)

  
 Selection sort
Selection sort is one of the simplest sort algorithms, but also one of the slowest.
One thing to note is that the selection sort's speed is constant for a given number of elements.
It is not affected by presorted or random data, thus implementing a shell sort with a selection sort does not improve the speed.
goanna.cs.rmit.edu.au /~stbird/Tutorials/SelectionSort.html   (232 words)

  
 String Sort Routines: Quick, Merge, Selection, and Insert Sort
Quick Sort: Fast for large arrays - delegates to insert sort when called with a small array and to sort small chunks of the large array.
This 'non-pure' quick sort is therefore quicker by not recursing for small chunks where a simple brute-force iteration is quicker.
NOTE: Due to the recursive nature of Quick and Merge sort they are not very efficient for small arrays which is why the routines delegate to a more brute force insert sort for small arrays.
www.freevbcode.com /ShowCode.asp?ID=965   (187 words)

  
 AI Horizon: Selection Sort
Selection Sort is the sort used most often by humans, since it's makes a lot of sense.
Let's say you are sorting some index cards labeled with numbers, and you want to order them smallest to largest.
Even though Selection Sort is one of the slower algorithms, it is used because it sorts with a minimum of data shifting.
www.aihorizon.com /essays/basiccs/lists/sorting/selection.htm   (285 words)

  
 Chapter 3   (Site not responding. Last check: 2007-10-28)
Sorting usually involves objects and not primitive types like long or int.
If multiple items of the same field value in the secondary sort retain the sort order of the first sort, the sorting algorithm is said to be stable.
Selection - minimizes swaps, but number of comparisons is still high.
www.skidmore.edu /~pvonk/cs206/CS206Lessons/Chapt3   (104 words)

  
 Sorting
Examples of elementary sorting algorithms are: selection sort, insertion sort, shell sort and bubble sort.
Selection sort is easy to implement; there is little that can go wrong with it.
Sort them (by direct comparison) so that the median of the three is in a[middle] and the largest is in a[right].
web.mit.edu /1.124/LectureNotes/sorting.html   (1734 words)

  
 Sorting Algorithms Demo
Some of these sorts are very stupid or very slow and should not be used in code.
Radix Sort Algorithm (by Alvin Raj) LinkedQueue.java and intNode.java
One of my favorite references to sorting routines is "Sorting" by William A. Martin, in ACM Computing Surveys, Volume 3, Number 4, December 1971, pages 147-174.
www.cs.ubc.ca /spider/harrison/Java/sorting-demo.html   (527 words)

  
 Simple Sorting in Java > Selection Sort   (Site not responding. Last check: 2007-10-28)
However, the selection sort can still offer a significant improvement for large records that must be physically moved around in memory, causing the swap time to be much more important than the comparison time.
What's involved in the selection sort is making a pass through all the players and picking (or selecting, hence the name of the sort) the shortest one.
For smaller values of N, the selection sort may in fact be considerably faster, especially if the swap times are much larger than the comparison times.
www.samspublishing.com /articles/article.asp?p=31526&seqNum=3&rl=1   (1000 words)

  
 Glimmer Labs: Some Standard Sorting Algorithms   (Site not responding. Last check: 2007-10-28)
Selection sort relies on your ability to easily identify the smallest value in the collection.
To sort using selection sort, you repeatedly (1) identify the smallest value and (2) put it at the front of the values not yet identified.
To merge two sorted lists, slst1 and slst2 Possibility 1: slst1 is empty Just use slst2 Possibility 2: slst2 is empty Just use slst1 Possibility 3: The first element of slst1 is less than element of slst2 Use the first element of slst1 as the first element of the merged list.
www.math.grin.edu /~walker/sorting-workshop/sorting-overview.html   (760 words)

  
 selection sort   (Site not responding. Last check: 2007-10-28)
Note: Sorting can be done in place by swapping the least remaining item with the item in the next position to be filled.
The algorithm is then like bubble sort with a more complicated control structure.
Heapsort can be seen as a variant of selection sort in which sorted items are arranged (in a heap) to quickly find the next item.
www.nist.gov /dads/HTML/selectionsrt.html   (219 words)

  
 PHP: Bubble Sort Algorithm And Variations. Insertion Sort. Shellsort.
Bubble sort is analyzed, also with regard to its differences with selection sorts, and support via Dhtml interfaces to see an animation of its proceedings is provided along.
The similarity between selection sort (and its derived products like bingo sort) and a bubble sort is that both are quadratic algorithms, namely their codes include a loop within a loop, or anyway a double scanning of the array to be sorted.
A selection sort by swappings leaves its sorted selection (which need no longer to be scanned) behind itself (say towards the lower array indexes), whereas a bubble sort by swappings leaves its sorted section before itself (say towards the higher array indexes).
www.unitedscripters.com /phps/bubblesort.html   (3220 words)

  
 Selection algorithm - Wikipedia, the free encyclopedia
Selection is a subproblem of many more complex problems like the nearest neighbor problem and shortest path problems.
Another fundamental selection problem is that of selecting the k smallest or k largest elements, which is particularly useful where we want to present just the "top k" of a sorted list, such as the top 100 corporations by gross sales.
Because language support for sorting is more ubiquitous, the simplistic approach of sorting followed by indexing is preferred in many environments despite its disadvantage in speed.
en.wikipedia.org /wiki/Selection_algorithm   (3040 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.