Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
The last video we talked about the preorder traversal of a binary search tree in this video I'm going
to walk through post Storer post order is a lot more complex it's definitely harder to implement from
a coding perspective depending on which data structure you use.
However once you can get a feel for how it works it shouldn't be a problem especially from a visualization
point of view.
So if you remember with preorder we start at the root with post order.
We actually start using the external nodes first and starting with the leftmost subtree which is then
followed by bubbling up all the internal nodes.
And so I'm going to show you exactly the way that works.
So with this binary search tree we'd actually start.
And I'm going to like I did in my last video I'm going to start with putting in the first item in and
it's going to be this 0 node right here.
So this is where we start because if you remember all the properties of binary search trees the left
most value is going to be the lowest value.
So with a post order traversal you start with the lowest value and then you go using external modes.
So the next one would be two and then four.
Now this is where it gets a little bit tricky.
Instead of going back up to one which you may think would be the natural thing to do we actually continue
just going down the line.
And so four would actually go to six and then six would go to five five to three three to one.
And you don't go up to the root yet.
Next spot that you'd actually go after the one would be the 8 node which is the lowest value on the
right subtree you have 8 and four that by a 10 by nine.
And the last value is seven.
So with this with a post order traversal you're always going to end up on the root node.
And so just to give you a little bit of clarity if you want to think of the flow of the way the data
works you actually go all the way down.
You swoop back up and then you do the same process on the right subtree and obviously this is a lot
more complicated.
If you were to get to a point where you know you have much further extending binary search trees.
These are the basic principles that you can use.
And so this is post order traversal please let me know if you have any questions whatsoever and I'll
see in the next video.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.