Guest User

Untitled

a guest
Nov 3rd, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public static int[] SelectionSort(int[] Array){
  2.         int Minimalstelle = 0;
  3.         int Speicher = 0;
  4.         for(int i= Array.length; i>=1; i--){
  5.             Minimalstelle = 0;
  6.             for(int aktuell= 1; aktuell<=Array.length; aktuell++){
  7.                 if(Array[Minimalstelle]< Array[aktuell]){
  8.                     Minimalstelle = aktuell;
  9.                 }
  10.                 Speicher = Array[Minimalstelle];
  11.                 Array[Minimalstelle] = Array[aktuell];
  12.                 Array[aktuell] = Speicher;
  13.             }
  14.  
  15.            
  16.         }
  17.         return Array;
  18.  
  19.     long Zeit = 0;
  20.  
  21.     public void SetzeZeitBeginn(){
  22.  
  23.         Zeit = System.currentTimeMillis();
  24.     }
  25.  
  26.     public void SetzeZeitEnde(){
  27.  
  28.         Zeit = System.currentTimeMillis()-Zeit;
  29.     }
  30.  
  31.     public long Differenz(){
  32.  
  33.        
  34.         return Zeit;
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment