de.hska.info1.klausur.ws07
Class Aufgabe4

java.lang.Object
  extended by de.hska.info1.klausur.ws07.Aufgabe4

public class Aufgabe4
extends java.lang.Object

Lösungsvorschläge zu Aufgabe 4. Teil a)

 9 7 2 5 3 2 1 4
 7 9
     2 5
 2 5 7 9
         2 3
             1 4
         1 2 3 4
 1 2 2 3 4 5 7 9
 
Richtige Reihenfolge der Unterteilungsschritte beachten.

Teil b) O(n)

Teil d) O(log n) (Rekursionstiefe, Verbrauch Laufzeitkeller)

Author:
pape

Constructor Summary
Aufgabe4()
           
 
Method Summary
 double potenzBerechnen(double a, int n)
           
 double potenzBerechnenVariante(double a, int n)
          Weiter Variante (Lösunge eines Studenten in der Klausur) Nutzt aus, dass für gerade n folgende gilt: an = (a2)n/2
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Aufgabe4

public Aufgabe4()
Method Detail

potenzBerechnen

public double potenzBerechnen(double a,
                              int n)

potenzBerechnenVariante

public double potenzBerechnenVariante(double a,
                                      int n)
Weiter Variante (Lösunge eines Studenten in der Klausur) Nutzt aus, dass für gerade n folgende gilt:
an = (a2)n/2



Prof. Dr. Pape