All language subtitles for 15 - Preorder Binary Tree Traversal English

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:08,240 --> 00:00:15,030 ‫So far we've talked about traversing a binary tree adding to a tree deleting from a tree but there's 2 00:00:15,050 --> 00:00:22,100 ‫a few other things that it's important to know especially if you're taking an algorithm class or you're 3 00:00:22,100 --> 00:00:29,360 ‫needing to create a good visualization for search and that's what binary trees are great for and the 4 00:00:29,360 --> 00:00:37,280 ‫very first thing we're going to do in this tutorial is go over what's called a pre order traversal. 5 00:00:37,280 --> 00:00:40,750 ‫And there is a few properties associated with it. 6 00:00:40,970 --> 00:00:47,750 ‫And I'm going to walk through the way the process works on the sample binary tree right here. 7 00:00:47,780 --> 00:00:53,600 ‫So the very first thing that you're going to do in a preorder traversal is visit the root. 8 00:00:53,660 --> 00:00:57,670 ‫So right here you can see that the root is 7. 9 00:00:57,740 --> 00:01:03,200 ‫And so we're going to traverse a tree and actually put this into an array appear at the top. 10 00:01:03,200 --> 00:01:12,140 ‫So for the array we're going to start off in or just say the first value we get is 7 because we're traversing 11 00:01:12,380 --> 00:01:16,780 ‫a tree and pre order the next step is actually to move to the left. 12 00:01:16,790 --> 00:01:24,550 ‫So we would move to this one value right here and we'd put this one in the array. 13 00:01:24,740 --> 00:01:31,090 ‫From there we would go further down to the left and get zero. 14 00:01:31,220 --> 00:01:37,490 ‫Put that in the array and then we're just going to keep on going down the list so now we're going to 15 00:01:37,490 --> 00:01:42,860 ‫come back up because zero doesn't have any children. 16 00:01:42,950 --> 00:01:44,120 ‫It's leafnode. 17 00:01:44,130 --> 00:01:46,810 ‫So then we're going to go over to three. 18 00:01:46,890 --> 00:01:49,550 ‫And so three is going to be the next value. 19 00:01:49,790 --> 00:01:52,900 ‫And from there we have to 20 00:01:56,100 --> 00:02:04,050 ‫and then back up to 3 and back down to 5 and evens is pretty straightforward it's more a process of 21 00:02:04,050 --> 00:02:05,820 ‫understanding just how it works. 22 00:02:05,830 --> 00:02:08,660 ‫But still finish this one out so you can see it. 23 00:02:08,850 --> 00:02:18,440 ‫So from five go down to four and then go back up to 5 and then go to six. 24 00:02:18,450 --> 00:02:25,050 ‫And so we've completed the left side of the binary search tree. 25 00:02:25,230 --> 00:02:28,370 ‫So now that we've done that we traverse all the way back up. 26 00:02:28,500 --> 00:02:32,810 ‫And then we go to that next value which is going to be 9. 27 00:02:32,820 --> 00:02:35,260 ‫So we'll go 7 to 9. 28 00:02:35,340 --> 00:02:46,910 ‫So this is on the right subtree and then from 9 would go down to 8 and then to 10 and that's it. 29 00:02:47,220 --> 00:02:56,550 ‫So this is how you traverse a tree using the pre order method when you're traversing a binary search 30 00:02:56,550 --> 00:02:56,830 ‫tree. 31 00:02:56,850 --> 00:03:01,320 ‫In the next video we're going to go over what's called the Post order traversal. 32 00:03:01,320 --> 00:03:02,530 ‫So see you in that video. 3455

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.