logo

Crowdly

Browser

Add to Chrome

Gegeben ist folgender Sortieralgorithmus:     void sort(int list[]) {        ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Gegeben ist folgender Sortieralgorithmus:

    void sort(int list[]) { 

        int n = list.length;

        for (int i = 0; i < n - 1; i++) 

            for (int j = 0; j < n - i - 1; j++)  

                 if (list[j] > list[j + 1]) 

                      swap(list[j], list[j + 1]);

    }

Wie viele Vertauschungen von Listenelementen (Operation: swap) gibt es im ungünstigsten Fall? 

More questions like this

Want instant access to all verified answers on moodle.jku.at?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome