Afrikaans
Akan
Albanian
Amharic
Arabic
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
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
Yeah, okay, so what are you saying, guys?
Did you try, do you succeed?
Let me know.
Let me know if you solve this exercise also on your own.
And it worked perfectly after minimizing the solution.
So let's try to solve it together and see what we need to change.
And basically, where I want to put your focus on, first of all, I want your focus right here.
OK, so that's what interesting to me.
If Nnam equals now, modular 10 equals two digit.
That means if the right most, the right most.
Digit.
In some.
Equals.
To the target that we are looking forward to the target.
Digit, then what it will mean, it will mean that we need to change the status if it was total appearances
so far was even then it will become odd.
And if it was odd, it should become even OK because it affect the number of appearances.
OK.
So how it will look like, how the solution to this exercise should look like.
So so far, we get the total off appearances, OK, and that's kind of nice.
Right.
The total of appearances would get it.
But what we will do is we will even remove these total of appearances so far because we know that it
represents basically these statement.
So let's take it and basically delete it.
And what we will ask is the following thing we will also remove this part.
OK, we'll just leave this one.
All of that we will remove, we will not check if it was equal to one.
And we will not check if it was equal to zero.
OK, we will not change.
Check anything.
OK, we will do something very, very.
It's call it tricky.
We'll ask if the current appearance of these function, if they're right, most digit equals to the
actual Thorogood digit, then what it means is that we need to change the status so far.
So if the status so far was won, we need to return zero if it was zero.
We need to return one in how you write it down.
Basically, if you typed down like something like this, then what it will mean is that if NUM divided
by 10 equals Two-Digit, then return.
Whatever was returned so far.
Without changing its status.
And that's not what we are looking to do.
We are looking to see that if no modular 10 does not equal two digit, then return that the total of
the status so far without any changes, right, because the rightmost digit does not affect the sub
problem result.
OK.
The rightmost digit does not affect the sub problem result.
But what should be the else whenever no module with victim equals two digit, what should be the else?
The yells should be very simple.
The wealth should be returned.
And pretty much the same just adding the not behind it.
So if it was zero, it will change it to one.
If it was one, it will change it to zero.
OK, guys.
So this is basically the same solution that we had previously, just kind of more elegant and more minimized.
And I really do recommend to start with the previous solution and then try optimizing it to look like
this.
OK, so this refers through once again to changing.
To not changing, this refers to keeping.
The status so far the same.
And this refers to changing the status zero to one.
Or one two zero.
Right.
One, two zero.
That's it.
OK, so if he sees that the not sign any changes in this case, from zero to one or from one to zero.
This is it for these video, guys.
Thank you so much for watching.
My name is Vlad.
This is alpha tech.
I really hope you enjoy the videos and the material so far.
It's getting interesting.
The material is getting more interesting.
The exercises are kind of nice.
You practice, you learn.
You move on.
OK.
So thank you so much.
Leave a review.
Some feedback will be very, very appreciated.
It helps me a lot in creating this content.
So until next time, 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.