All language subtitles for 5. Count the number of values in a List

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
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
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

Original subtitles

So additional question in our programming course regarding linked lists, I hope you are on right so

far.

So this question is very similar to you exercise the previous exercise.

So we will go over it really quickly.

So what do we have to do is to write a function that receives a linked receives a linked list and some

integer number, OK?

And all the function should do is simply to return the number.

OK, let's modify this part.

Return the number.

OK, the number of occurrences of these events number in the list.

OK, so we receive a linked list and we receive a number and we eat to rate over all the nodes of these

linked list and then we count how many times.

And we we we've even if we have encountered in the nodes that have these integer number.

OK, so let's start writing down the function.

And what we can say is that the function is going to be probably of an integer type.

Right, because we use it to count something to count the number of nodes having these number.

OK, and it's very simple.

So ain't, let's say, total total number appearances, appearances, even say it in list.

OK, so these function will receive the header and also it will receive a number.

So it no num no.

You know, what we are going to do here is to create a count variable just like previously in council

or in count equals to zero node pointer current and let's say tampoe equals to had.

You know what we are going to do is as long as we haven't reached the end of the linked list, meaning

we haven't reached the last node.

So while Tambe next does not equals two does not equal to null.

So as long as that's the case, we will check if temp data equals to.

And if that's the case, we will simply use count plus plus meaning we found a node that has as its

in its data field, a num num value.

So found a corresponding corresponding node, ok.

And of course in both cases if we found or if we didn't find, then we should simply move temp to the

next node.

So temp equals to temp next.

And there you go.

That's how you iterate over all the nodes of this linked list and you count how many times you found

a corresponding node with a data field equals to NUM, which is this guy over here.

And lastly, you simply return the count and that's how you do it.

Guys, that's how you do it.

That's how you tackle different linked list problems.

That's how you work with pointers.

I hope they at this point, you're starting to feel more confident about how pointers can be used.

Of course, there are a lot of data structures that we may use for our practice, but for these section,

I think it will be enough.

And this is it for this video, guys.

As always, let me know what you think about it.

Feel free to to put some review, to write some comments and until next time, have a great day or evening,

whatever it is.

I'll see you then.

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