1
00:00:01,740 --> 00:00:02,460
Hi, everyone.

2
00:00:02,490 --> 00:00:06,250
So in this video, we are going to solve this question, find the length of the character.

3
00:00:07,200 --> 00:00:09,960
We can easily solve this question with the help of all of our value.

4
00:00:09,970 --> 00:00:13,410
But we need to apply recursion so we will use it to solve this problem.

5
00:00:13,830 --> 00:00:19,920
So if I were strangers, if I were Kappos ABC, then the length should be fought so hard against all

6
00:00:19,920 --> 00:00:20,420
discussion.

7
00:00:20,430 --> 00:00:21,320
So it's very easy.

8
00:00:21,330 --> 00:00:22,470
It is very easy to do.

9
00:00:23,560 --> 00:00:29,140
So I will call verification on this area, so I will call verification on this occasion will give me

10
00:00:29,140 --> 00:00:30,190
the land for this Eddie.

11
00:00:31,800 --> 00:00:36,870
It will give me the land for this area and I will plus one, so I will add plus one and that will be

12
00:00:36,870 --> 00:00:37,760
my final answer.

13
00:00:38,070 --> 00:00:38,600
Simple.

14
00:00:39,240 --> 00:00:43,440
So let us not rewrite the code so that they will be integer.

15
00:00:43,460 --> 00:00:44,820
We are going to return the land.

16
00:00:45,240 --> 00:00:46,920
Let's say the name of the function is land.

17
00:00:47,940 --> 00:00:50,780
So it will take character that is and put.

18
00:00:53,490 --> 00:00:57,390
So first, what will be excuse me is very simple if.

19
00:00:58,480 --> 00:01:02,140
Our area is empty, so that means in Port of zero is nil.

20
00:01:04,540 --> 00:01:08,660
So if I were a somebody in that case, what would be the length Lenthall be zero.

21
00:01:09,100 --> 00:01:10,300
So I would have done zero.

22
00:01:11,360 --> 00:01:16,080
Otherwise, what will do so as discussed, first of all, we will call that equation.

23
00:01:17,150 --> 00:01:18,250
So this is our area.

24
00:01:19,570 --> 00:01:24,190
So I will call the occasion on this and I will call the occasion on this.

25
00:01:24,610 --> 00:01:26,140
So the commission will give me the answer.

26
00:01:26,740 --> 00:01:31,450
You will give me relent for this small area, Lentulov of a small area lenth small.

27
00:01:31,840 --> 00:01:35,950
And then I will add plus one I will add plus one, and that will be my final answer.

28
00:01:36,160 --> 00:01:39,420
So let's call that equation and let's take a variable to store the answer.

29
00:01:39,790 --> 00:01:41,110
So let's name it.

30
00:01:42,400 --> 00:01:43,210
Small island.

31
00:01:44,530 --> 00:01:48,250
So what is more land, let's call the land function?

32
00:01:51,500 --> 00:01:55,180
So that is in part plus one, we need to pass this.

33
00:01:56,060 --> 00:01:57,560
We need to pass this right.

34
00:01:57,590 --> 00:01:59,600
So this is the Saudis input.

35
00:02:00,490 --> 00:02:05,740
And this adds input plus one, so we know the answer for this area.

36
00:02:06,040 --> 00:02:08,620
What I need to do, I will add plus one and I will return.

37
00:02:09,840 --> 00:02:11,340
So a pleasant handwritten.

38
00:02:13,430 --> 00:02:16,010
So that's done one plus small and.

39
00:02:17,980 --> 00:02:25,750
And I think our function will work, so let's create an eddy, so character and sort of size and I will

40
00:02:25,750 --> 00:02:26,890
take input from the user.

41
00:02:29,810 --> 00:02:31,160
And let's call it a function.

42
00:02:36,670 --> 00:02:37,850
So in order to spend the.

43
00:02:48,250 --> 00:02:50,080
So I thought I'd say McWilliam here.

44
00:02:54,790 --> 00:02:57,730
And the name of the function is wrong spelling mistake.

45
00:03:01,460 --> 00:03:06,950
So it is waiting for the input to the inputs ABCDE, so the output is for the Lantis for.

46
00:03:08,070 --> 00:03:09,380
Let's test one more time.

47
00:03:11,330 --> 00:03:16,740
So the input is A, B, C, D, E, F, G, and the output is seven.

48
00:03:16,760 --> 00:03:21,220
So basically our function is working and now let us know how it is working.

49
00:03:21,530 --> 00:03:23,830
So logistics, for example, ABCDE.

50
00:03:27,430 --> 00:03:29,470
So we have now told ABC Radio National.

51
00:03:29,860 --> 00:03:34,150
So check the first character, first characters, nocturnal, so called Collision.

52
00:03:35,510 --> 00:03:42,440
We could call on this, Mollari, so the first character is not so collocation, this Mollari silly.

53
00:03:43,650 --> 00:03:51,530
First character is not an so called Erica DNN, so again, the first character is not called dedication.

54
00:03:51,720 --> 00:03:53,180
So now the first character is.

55
00:03:53,670 --> 00:03:56,620
So if you hadn't written so this will return zero.

56
00:03:57,120 --> 00:04:00,940
So whatever value you are getting from recursion, you will add plus 101.

57
00:04:00,970 --> 00:04:02,670
So I'm getting zero, I will add plus one.

58
00:04:02,940 --> 00:04:08,460
So it will become one whatever value you are getting at, plus one, it will return to a developed country

59
00:04:08,460 --> 00:04:12,300
and it will return for so far is the correct output for ABCDE.

60
00:04:13,140 --> 00:04:13,640
Simple.

61
00:04:13,890 --> 00:04:14,700
So what you can do.

62
00:04:14,850 --> 00:04:19,200
So basically this very small land, there's no need to create this variable.

63
00:04:19,350 --> 00:04:20,930
You can directly put the value here.

64
00:04:20,940 --> 00:04:23,340
So the value of small and variable is this.

65
00:04:23,610 --> 00:04:27,120
So that's directly put the value and let's not create the variable.

66
00:04:28,210 --> 00:04:30,490
So there is no need to correct the variable just.

67
00:04:31,400 --> 00:04:32,290
Got it from here.

68
00:04:33,930 --> 00:04:34,980
And Pastor Ted.

69
00:04:41,040 --> 00:04:46,740
So let's test one more time, so they put this basically ABC and the dentistry, so our function is

70
00:04:46,740 --> 00:04:47,130
working.

71
00:04:47,490 --> 00:04:48,850
So this is it from this video.

72
00:04:48,900 --> 00:04:50,150
I will see you in the next one.

