100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Zusammenfassung Informatik: Die Datenstrukur Graph (Kennzeichen, Darstellung, Durchlauf) + Die Datenstruktur Baum (Löschen, Durchlauf) Q11 Gymnasium Bayern $3.44   Add to cart

Summary

Zusammenfassung Informatik: Die Datenstrukur Graph (Kennzeichen, Darstellung, Durchlauf) + Die Datenstruktur Baum (Löschen, Durchlauf) Q11 Gymnasium Bayern

 45 views  1 purchase
  • Course
  • Institution
  • Book

Diese Zusammenfassung behandelt teilweise das 2. Kapitel und das ganze 3. Kapitel, des Buches: Informatik Oberstufe 1, für die Q11 Gymnasium in Bayern. Enthalten sind folgende Themen. Das Löschen von Bäumen, Durchlaufen von Bäumen, Kennzeichen von Graphen, Darstellung von Graphen, Graphendurchl...

[Show more]

Preview 2 out of 7  pages

  • No
  • Kapitel 2 und kapitel 3
  • October 13, 2021
  • 7
  • 2021/2022
  • Summary
  • Secondary school
  • Gymnasium
  • 1
avatar-seller
Informatik Kurzarbeit:


Bäume:
• Löschen (Programmcode):
Es müssen drei Fälle berücksichtigt werden:
1. Knoten hat keinen Nachfolger → einfach entfernen
2. Knoten hat nur einen Nachfolger → Knoten durch Nachfolger ersetzen
3. Knoten hat 2 Nachfolger → Idee: Knoten durch kleinsten Knoten im rechten Teilbaum ersetzen.


o Entfernen in BINBAUM:
public void Entfernen(String wort)
{
WOERTERBUCHEINTRAG w = new WOERTERBUCHEINTRAG(wort,"");
wurzel = wurzel.Entfernen(w);
}

o Entfernen in KNOTEN:
public BAUMELEMENT Entfernen(DATENELEMENT d)
{
if(daten.InformationAusgeben().equals(d.InformationAusgeben() ) )
{
if(nachfolgerLinks.IstAbschluss() && nachfolgerRechts.IstAbschluss() )
{
return nachfolgerLinks; //alternativ: return new Abschluss();
}
else
{
if(nachfolgerLinks.IstAbschluss() && !nachfolgerRechts.IstAbschluss() )
{
return nachfolgerRechts;
}
else{
if(!nachfolgerLinks.IstAbschluss() && nachfolgerRechts.IstAbschluss() )
{
return nachfolgerLinks;
}
else
{
DATENELEMENT kleinstesElementRechts;
kleinstesElementRechts = nachfolgerRechts.KleinstesElement(null);
daten = kleinstesElementRechts;
nachfolgerRechts.Entfernen(kleinstesElementRechts);

, return this;
/* kompaktere Alternative:
* daten = nachfolgerRechts.KleinstesElement(null);
* nachfolgerRechts.Entfernen(kleinstesElementRechts);
* return this;
*/
}
}
}
}
else
{
if(daten.IstKleinerAls(d))
{
nachfolgerRechts = nachfolgerRechts.Entfernen(d);
}
else
{
nachfolgerLinks = nachfolgerLinks.Entfernen(d);
}
return this;
}
}
• Durchlaufen eines Baumes:


In-Order:
1. Ausgabe des linken Teilbaums
2. Ausgabe des Knoteninhalts
3. Ausgabe des rechten Teilbaums
(==>von links – über den Knoten - nach rechts)

2 4 5 7 8 9 11
Pre-Order: Post-Order:
1. Ausgabe des Knoteninhalts 1. Ausgabe des linken Teilbaums
2. Ausgabe des linken Teilbaums 2. Ausgabe des rechten Teilbaums
3. Ausgabe des rechten Teilbaums 3. Ausgabe des Knoteninhalts
(==>vom Knoten, nach links und dann rechts) (==>von links nach rechts, dann Knoten)

7 4 2 5 9 8 11 2 5 4 8 11 9 7

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller fabianfriedrich1. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $3.44. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

72841 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$3.44  1x  sold
  • (0)
  Add to cart