[so] Algoritm de stergere
Vlad Cananau
vladk2k at gmail.com
Thu Nov 15 20:22:26 EET 2007
On Nov 15, 2007 8:20 PM, Mihai Borobocea <mihaiborobocea at gmail.com> wrote:
> Stergi 30, si 'aduci' in locul lui succesorul.
> Rezultatul:
>
> 20
> / \
> 10 35
> /
> 25
>
> On Nov 15, 2007 8:10 PM, Vlad Cananau <vladk2k at gmail.com> wrote:
> > In enunt zice asa: "Pentru stergerea unui nod din arbore se va folosi
> > varianta de algoritm care sterge SUCCESORUL, daca nodul are ambii fii."
> > Asta ce inseamna, mai exact, ca nu se sterge nodul curent?
> > daca am urmatorul arbore
> > 20
> > / \
> > 10 30
> > / \
> > 25 35
> >
> > si se cere stergerea lui 30, se sterge SUCCESORUL, adica 35?
>
>
ok, si cu formularea din enunt cum ramane?
--
___
Vlad Cananau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/so/attachments/20071115/7a3e9651/attachment.html
More information about the so
mailing list