Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int[] SelectionSort(int[] Array){
- int Minimalstelle = 0;
- int Speicher = 0;
- for(int i= Array.length; i>=1; i--){
- Minimalstelle = 0;
- for(int aktuell= 1; aktuell<=Array.length; aktuell++){
- if(Array[Minimalstelle]< Array[aktuell]){
- Minimalstelle = aktuell;
- }
- Speicher = Array[Minimalstelle];
- Array[Minimalstelle] = Array[aktuell];
- Array[aktuell] = Speicher;
- }
- }
- return Array;
- long Zeit = 0;
- public void SetzeZeitBeginn(){
- Zeit = System.currentTimeMillis();
- }
- public void SetzeZeitEnde(){
- Zeit = System.currentTimeMillis()-Zeit;
- }
- public long Differenz(){
- return Zeit;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment