Selection Sort Algorithm

This is the Selection Sort Algorithm.

The idea behind selection sort is to search for the largest element in the list, or in this case the highest test score, move that element to the beginning of the list, and then repeat the same procedure on the remaining portion of the list.

The pseudocode for this algorithm is as follows:
SelectionSort(A, start, end):
     for (i = start to end)
          min <- i
          for (j = i+1 to end)
               if (A[j] < A[min])
                    min <- j
               end if
          end for

          temp <- A[i]
          A[i] <- A[min]
          A[min] <- temp
     end for
end SelectionSort



Show Work?

Recent Updates

  • 05-13-2013 Permutation Problems
  • 05-13-2013 My Review of "The Golden Ticket: P, NP, and the Search for the Impossible"
  • 05-05-2013 Approximating the Set Cover Problem
  • 04-16-2013 What is a "Hard" Problem?
  • 03-29-2013 Knapsack Problems
  • 03-22-2013 Triangle Trigonometry
  • 03-12-2013 Sudoku Program Updates
  • 03-02-2013 The PageRank Algorithm
  • 02-27-2013 The Risk of Competition
  • 02-08-2013 Nonogram Puzzles
  • 02-04-2013 Geometric Sequences
  • 02-02-2013 Arithmetic Sequences
  • 01-20-2013 Learn to Solve Single Variable Linear Equations
  • 01-08-2013 Fraction Arithmetic
  • 11-24-2012 Learn About "the Other" Algebra
  • 10-06-2012 Shade The Cells Puzzle
  • 10-06-2012 Learn Duality in Linear Programming
  • 10-02-2012 Learning the Apriori Algorithm
  • 08-28-2012 Visualizing Huffman Coding Trees
  • 08-16-2012 Understanding Bayes' Theorem
  • 08-08-2012 Learn Math Through Set Relations
  • 07-24-2012 How Could You Possibly Love/Hate Math?
  • 07-08-2012 Learn About Binary Search Trees
  • 06-25-2012 Learning Math through Set Theory
  • 06-25-2012 Linear Search Algorithm
  • 06-25-2012 Examples of the Binary Search Algorithm
  • 06-25-2012 Queue Data Structure
  • 06-25-2012 Stack Data Structure
  • 06-11-2012 Sorting Algorithms (Take Two)
  • 04-30-2012 My Life (as a Number)
  • 04-22-2012 K-Means Clustering
  • 03-04-2012 The Simplex Method
  • 01-02-2012 New Years is a LEARNINGlover Thing!
  • 12-23-2011 My Sudoku Program
  • 12-13-2011 Sorting Algorithms
  • 12-10-2011 So You Want to Program? Lets Get Started!
  • 12-09-2011 What Can I Do to Help End the Recession?
  • 12-07-2011 The Degrees of Consciousness of a Black Nerd
  • 12-05-2011 User Generated Flash Cards
  • 10-16-2011 Text Summarization
  • 08-30-2011 Bellman-Ford Algorithm
  • 08-28-2011 Dijkstra's Algorithm
  • 08-25-2011 Kruskal's Algorithm
  • 08-24-2011 Prim's Algorithm
  • 08-23-2011 Gaussean Elimination
  • 08-23-2011 Euclid's Algorithm
  • 08-23-2011 Sieve of Eratosthenes
  • 08-23-2011 The Cost of Learning
  • 08-23-2011 Examples Page
  • 08-23-2011 Flash Cards Page
  • 08-23-2011 Hello, World!