Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,820 --> 00:00:04,610
Yeah, okay, so what are you saying, guys?
2
00:00:04,710 --> 00:00:07,140
Did you try, do you succeed?
3
00:00:07,590 --> 00:00:08,460
Let me know.
4
00:00:08,490 --> 00:00:11,850
Let me know if you solve this exercise also on your own.
5
00:00:12,090 --> 00:00:15,030
And it worked perfectly after minimizing the solution.
6
00:00:16,710 --> 00:00:21,300
So let's try to solve it together and see what we need to change.
7
00:00:21,750 --> 00:00:28,080
And basically, where I want to put your focus on, first of all, I want your focus right here.
8
00:00:28,240 --> 00:00:30,420
OK, so that's what interesting to me.
9
00:00:30,870 --> 00:00:33,870
If Nnam equals now, modular 10 equals two digit.
10
00:00:34,170 --> 00:00:39,300
That means if the right most, the right most.
11
00:00:41,110 --> 00:00:41,770
Digit.
12
00:00:44,570 --> 00:00:45,380
In some.
13
00:00:47,730 --> 00:00:48,510
Equals.
14
00:00:50,040 --> 00:00:53,520
To the target that we are looking forward to the target.
15
00:00:54,970 --> 00:01:02,770
Digit, then what it will mean, it will mean that we need to change the status if it was total appearances
16
00:01:02,770 --> 00:01:05,290
so far was even then it will become odd.
17
00:01:05,500 --> 00:01:11,050
And if it was odd, it should become even OK because it affect the number of appearances.
18
00:01:12,270 --> 00:01:12,600
OK.
19
00:01:13,950 --> 00:01:19,320
So how it will look like, how the solution to this exercise should look like.
20
00:01:20,250 --> 00:01:26,040
So so far, we get the total off appearances, OK, and that's kind of nice.
21
00:01:27,600 --> 00:01:27,930
Right.
22
00:01:28,020 --> 00:01:30,120
The total of appearances would get it.
23
00:01:33,290 --> 00:01:42,290
But what we will do is we will even remove these total of appearances so far because we know that it
24
00:01:42,290 --> 00:01:44,600
represents basically these statement.
25
00:01:46,380 --> 00:01:49,470
So let's take it and basically delete it.
26
00:01:50,970 --> 00:01:56,520
And what we will ask is the following thing we will also remove this part.
27
00:01:57,150 --> 00:01:59,280
OK, we'll just leave this one.
28
00:02:00,430 --> 00:02:04,990
All of that we will remove, we will not check if it was equal to one.
29
00:02:05,740 --> 00:02:08,500
And we will not check if it was equal to zero.
30
00:02:08,990 --> 00:02:10,870
OK, we will not change.
31
00:02:10,900 --> 00:02:12,160
Check anything.
32
00:02:12,700 --> 00:02:14,950
OK, we will do something very, very.
33
00:02:15,460 --> 00:02:17,230
It's call it tricky.
34
00:02:19,130 --> 00:02:27,890
We'll ask if the current appearance of these function, if they're right, most digit equals to the
35
00:02:27,890 --> 00:02:35,070
actual Thorogood digit, then what it means is that we need to change the status so far.
36
00:02:36,260 --> 00:02:42,030
So if the status so far was won, we need to return zero if it was zero.
37
00:02:42,050 --> 00:02:45,410
We need to return one in how you write it down.
38
00:02:46,100 --> 00:02:52,910
Basically, if you typed down like something like this, then what it will mean is that if NUM divided
39
00:02:52,910 --> 00:02:55,400
by 10 equals Two-Digit, then return.
40
00:02:56,660 --> 00:02:59,360
Whatever was returned so far.
41
00:03:00,510 --> 00:03:02,010
Without changing its status.
42
00:03:03,110 --> 00:03:04,820
And that's not what we are looking to do.
43
00:03:05,510 --> 00:03:14,360
We are looking to see that if no modular 10 does not equal two digit, then return that the total of
44
00:03:14,360 --> 00:03:20,630
the status so far without any changes, right, because the rightmost digit does not affect the sub
45
00:03:20,630 --> 00:03:21,620
problem result.
46
00:03:22,500 --> 00:03:22,880
OK.
47
00:03:23,130 --> 00:03:27,060
The rightmost digit does not affect the sub problem result.
48
00:03:27,600 --> 00:03:36,860
But what should be the else whenever no module with victim equals two digit, what should be the else?
49
00:03:37,690 --> 00:03:39,090
The yells should be very simple.
50
00:03:39,600 --> 00:03:41,070
The wealth should be returned.
51
00:03:42,170 --> 00:03:47,690
And pretty much the same just adding the not behind it.
52
00:03:48,750 --> 00:03:51,360
So if it was zero, it will change it to one.
53
00:03:51,870 --> 00:03:54,360
If it was one, it will change it to zero.
54
00:03:55,810 --> 00:03:56,410
OK, guys.
55
00:03:57,220 --> 00:04:05,800
So this is basically the same solution that we had previously, just kind of more elegant and more minimized.
56
00:04:07,120 --> 00:04:13,480
And I really do recommend to start with the previous solution and then try optimizing it to look like
57
00:04:13,480 --> 00:04:13,810
this.
58
00:04:15,930 --> 00:04:20,370
OK, so this refers through once again to changing.
59
00:04:21,490 --> 00:04:24,040
To not changing, this refers to keeping.
60
00:04:25,790 --> 00:04:28,400
The status so far the same.
61
00:04:29,710 --> 00:04:35,740
And this refers to changing the status zero to one.
62
00:04:37,140 --> 00:04:38,490
Or one two zero.
63
00:04:40,060 --> 00:04:40,390
Right.
64
00:04:41,480 --> 00:04:42,620
One, two zero.
65
00:04:43,680 --> 00:04:44,220
That's it.
66
00:04:45,630 --> 00:04:51,930
OK, so if he sees that the not sign any changes in this case, from zero to one or from one to zero.
67
00:04:54,220 --> 00:04:55,910
This is it for these video, guys.
68
00:04:55,930 --> 00:04:57,250
Thank you so much for watching.
69
00:04:57,280 --> 00:04:58,150
My name is Vlad.
70
00:04:58,240 --> 00:04:59,320
This is alpha tech.
71
00:04:59,330 --> 00:05:02,860
I really hope you enjoy the videos and the material so far.
72
00:05:03,040 --> 00:05:04,330
It's getting interesting.
73
00:05:04,360 --> 00:05:06,860
The material is getting more interesting.
74
00:05:06,880 --> 00:05:08,830
The exercises are kind of nice.
75
00:05:08,830 --> 00:05:10,060
You practice, you learn.
76
00:05:10,060 --> 00:05:10,660
You move on.
77
00:05:11,110 --> 00:05:11,380
OK.
78
00:05:11,800 --> 00:05:13,090
So thank you so much.
79
00:05:13,450 --> 00:05:14,350
Leave a review.
80
00:05:14,350 --> 00:05:17,050
Some feedback will be very, very appreciated.
81
00:05:17,050 --> 00:05:19,690
It helps me a lot in creating this content.
82
00:05:20,080 --> 00:05:22,090
So until next time, I'll see you then.
6768
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.