CoboCards App FAQ & Wishes Feedback
Language: English Language
Sign up for free  Login

This flashcard is just one of a free flashcard set. See all flashcards!

All main topics / Informatik / Algorithmen & Datenstrukturen / ADS
9
Quick Sort
private void quicksort (int [] a, int links, int rechts)
    {
        int i=links;
        int j=rechts;
        int mitte =a[(links+rechts)/2];
        while (i<=j) {   
            while (a[i]< mitte) i;
            while (a[j]>mitte) j
;
            if (i<=j) {
                swap(a, i, j);
                i
;
                j ;
            }
        }
        if (links<j) quicksort(a, links, j);
        if (i<rechts) quicksort(a, i, rechts);
    }

  
New comment
Flashcard info:
Author: hristiana86
Main topic: Informatik
Topic: Algorithmen & Datenstrukturen
School / Univ.: HS
City: Mannheim
Published: 14.06.2010

Cancel
Email

Password

Login    

Forgot password?
Deutsch  English