1
00:00:02,160 --> 00:00:02,850
Hi, everyone.

2
00:00:02,880 --> 00:00:05,970
So in this video, we are going to solve this question, Ripley's character.

3
00:00:07,050 --> 00:00:14,130
So basically, if this is our character, very similar to the 80s, Abby, Sudi, Abby and I want to

4
00:00:14,130 --> 00:00:17,660
replace all the characters with YX.

5
00:00:18,510 --> 00:00:22,560
So what will happen after replacing all the avionics?

6
00:00:22,560 --> 00:00:28,330
So our sting will become our character will become X, then B, C, D, X and B.

7
00:00:28,830 --> 00:00:31,940
So given this thing, I need to update this thing.

8
00:00:31,950 --> 00:00:33,720
Basically, I need to modify this thing.

9
00:00:34,380 --> 00:00:35,900
So I need to modify our string.

10
00:00:36,120 --> 00:00:41,440
We can easily solve this question by iterating over the fact that I'm using the phone to of the loop,

11
00:00:41,460 --> 00:00:43,470
but we need to solve this question recursively.

12
00:00:43,620 --> 00:00:45,170
So it's very simple what we will do.

13
00:00:45,360 --> 00:00:46,770
So this is our already.

14
00:00:48,780 --> 00:00:49,780
So what you do?

15
00:00:49,800 --> 00:00:50,370
I will check.

16
00:00:51,030 --> 00:00:56,970
So first of all, I will do the small work, so I will check at this position is present or not, if

17
00:00:57,240 --> 00:00:59,520
I is present, I will replace it by X.

18
00:00:59,910 --> 00:01:08,040
So I need to check if input of zero is equal to the character, then I need to update the character.

19
00:01:08,070 --> 00:01:10,050
So input of zero will become X.

20
00:01:12,900 --> 00:01:18,870
And what I will do now so I will call Dacogen on this area and Dacogen will replace all the values of

21
00:01:18,870 --> 00:01:21,140
character with simple.

22
00:01:21,420 --> 00:01:25,040
So I will do the small work and the question will do the rest of the work.

23
00:01:25,470 --> 00:01:25,980
Simple.

24
00:01:26,170 --> 00:01:27,210
So let's write the code.

25
00:01:29,040 --> 00:01:31,530
So they're functionally void.

26
00:01:31,560 --> 00:01:37,500
I will not done anything, I will do the changes in the string or the character only, so let's see,

27
00:01:37,500 --> 00:01:39,380
the name of the function is replaced, corrected.

28
00:01:40,320 --> 00:01:41,160
It will take.

29
00:01:42,530 --> 00:01:43,630
But it is in good.

30
00:01:49,630 --> 00:01:55,500
What with be the biscuits, so biscuits is very simple, if my heart is empty, so if there is empty

31
00:01:55,540 --> 00:01:57,490
in zero is nil.

32
00:01:59,560 --> 00:02:02,530
So if there is anybody you do not need to do anything, you will simply return.

33
00:02:04,580 --> 00:02:05,440
That is check.

34
00:02:06,770 --> 00:02:08,449
So the plan is very simple.

35
00:02:09,600 --> 00:02:14,640
I will do the small work on occasion, will do the rest of the work, so I will check at disposition

36
00:02:15,240 --> 00:02:18,680
is present or not, if it's present, I will replace it by X.

37
00:02:18,690 --> 00:02:21,630
Otherwise, I need to call that for the.

38
00:02:22,480 --> 00:02:28,880
The rest of the area, so check if in pataphysical zero, is it to.

39
00:02:30,010 --> 00:02:35,600
The character in that case, you to update unit to replace the character.

40
00:02:36,880 --> 00:02:40,960
By X, so replaced by X.

41
00:02:45,830 --> 00:02:52,850
So you will call litigation, so the question will replace all the character with character and the

42
00:02:52,870 --> 00:02:54,740
ETAs basically in particular one.

43
00:02:55,860 --> 00:02:56,970
And plus one.

44
00:02:58,040 --> 00:03:01,320
So what I'm doing here is I am checking for this value.

45
00:03:01,340 --> 00:03:02,720
I am doing my small work here.

46
00:03:04,510 --> 00:03:08,240
And after doing my small work, I will call dedication for the rest of the day.

47
00:03:08,260 --> 00:03:13,180
So this is input lesson and I think our function will work.

48
00:03:13,510 --> 00:03:14,140
So let's see.

49
00:03:14,980 --> 00:03:16,030
Let's call the function.

50
00:03:17,070 --> 00:03:18,360
So after printing Dylan.

51
00:03:19,490 --> 00:03:21,260
It's called a function of the character.

52
00:03:24,090 --> 00:03:25,290
And I will give it.

53
00:03:26,970 --> 00:03:27,750
And Portelli.

54
00:03:29,910 --> 00:03:34,380
And let us also bring to the area so that we can see so in port.

55
00:03:37,740 --> 00:03:40,580
And let's bring in Proterra before replacing director.

56
00:03:41,500 --> 00:03:45,220
So I'm printing the land, then I am printing the correct Betty.

57
00:03:49,270 --> 00:03:55,900
So I am printing the and then I printing Michaela Pereira, then I will replace all the characters with

58
00:03:55,930 --> 00:03:58,650
character and then I am printing the character again.

59
00:03:59,850 --> 00:04:00,480
So let's see.

60
00:04:04,700 --> 00:04:09,020
So it is waiting for the input, let's say the input is a.

61
00:04:10,020 --> 00:04:16,800
So dentistry, this is before replacing and this is after replacing X, X, X, let's take one more

62
00:04:16,800 --> 00:04:17,339
example.

63
00:04:20,730 --> 00:04:24,750
So a, b, a, b, c, d, the D.

64
00:04:25,350 --> 00:04:26,340
S, f, g.

65
00:04:28,090 --> 00:04:30,700
So let's see whether the output is right or wrong.

66
00:04:35,130 --> 00:04:43,010
So he is replaced by again, replaced by ex, so again, next here and then everything is fine.

67
00:04:43,170 --> 00:04:44,840
So basically our function is working.

68
00:04:44,850 --> 00:04:48,190
So this replace critical function, it is working so much better.

69
00:04:48,510 --> 00:04:49,650
But one example.

70
00:04:51,400 --> 00:04:52,710
Let's bring our function.

71
00:04:52,780 --> 00:04:56,340
Let's take a very small example, so let's take two examples.

72
00:04:56,470 --> 00:04:57,730
This is the first example.

73
00:04:59,890 --> 00:05:01,600
ABC aired the.

74
00:05:03,560 --> 00:05:09,680
So check the first character, first character is replaced by X, so I will replace it by X and then

75
00:05:09,680 --> 00:05:12,300
call the recursion, so I will call that equation someone.

76
00:05:12,330 --> 00:05:14,070
Let me see.

77
00:05:14,210 --> 00:05:17,500
The first character is not doing a thing called recursion.

78
00:05:18,490 --> 00:05:24,700
So the question first character is not a do nothing simple qualification, this Monetti first character

79
00:05:24,700 --> 00:05:28,480
is replaced by X, so I will replace it by X and call that equation.

80
00:05:29,050 --> 00:05:33,520
So I'm quoting that it goes so first character is not so do not think dedication.

81
00:05:33,550 --> 00:05:36,310
So we have none here, so I will call on all.

82
00:05:36,580 --> 00:05:38,710
So similarly we have none at the end.

83
00:05:40,290 --> 00:05:45,950
So whenever you get done, so I will return and I'm not doing anything, so return.

84
00:05:46,110 --> 00:05:48,360
Dun dun dun dun.

85
00:05:48,390 --> 00:05:50,830
And finally, what is my area?

86
00:05:50,860 --> 00:05:55,390
So my ideas for correctness changed X and this has also changed X.

87
00:05:55,420 --> 00:05:59,730
So the character is X, B, X and which is right.

88
00:05:59,730 --> 00:06:04,100
And we know that our past Bio-Reference areas are always masturbator.

89
00:06:04,410 --> 00:06:05,690
So this is the right output.

90
00:06:06,000 --> 00:06:07,380
So let's take one more example.

91
00:06:10,710 --> 00:06:14,400
So this is now look to be the.

92
00:06:15,290 --> 00:06:18,680
EMT, and then we have none, so check the first character.

93
00:06:18,710 --> 00:06:23,030
It is not a do nothing call goes on this morning at NBC first, correct?

94
00:06:23,100 --> 00:06:23,570
Is not there?

95
00:06:23,570 --> 00:06:24,980
Do not call verification.

96
00:06:24,980 --> 00:06:25,730
We have nothing here.

97
00:06:26,090 --> 00:06:29,750
So we have additional first character is replaced by X.

98
00:06:30,780 --> 00:06:36,570
Then called into question this malerie CNN, so first character is not doing a thing called preclusion

99
00:06:36,840 --> 00:06:43,730
onal, whenever you encounter Willerton and you are not doing anything after Director Gengel, so redundant

100
00:06:43,740 --> 00:06:45,020
and written and written.

101
00:06:45,240 --> 00:06:46,770
So what is my final edit?

102
00:06:46,950 --> 00:06:51,930
So this value has been replaced by X, so B, B, Excellency's detailed output.

103
00:06:52,800 --> 00:06:54,460
So basically our function is working.

104
00:06:54,810 --> 00:06:56,330
So this is it from this video.

105
00:06:56,340 --> 00:06:57,600
I will see you on the next one.

