Hi, everyone.
So in this video, we are going to solve this question, Ripley's character.
So basically, if this is our character, very similar to the 80s, Abby, Sudi, Abby and I want to
replace all the characters with YX.
So what will happen after replacing all the avionics?
So our sting will become our character will become X, then B, C, D, X and B.
So given this thing, I need to update this thing.
Basically, I need to modify this thing.
So I need to modify our string.
We can easily solve this question by iterating over the fact that I'm using the phone to of the loop,
but we need to solve this question recursively.
So it's very simple what we will do.
So this is our already.
So what you do?
I will check.
So first of all, I will do the small work, so I will check at this position is present or not, if
I is present, I will replace it by X.
So I need to check if input of zero is equal to the character, then I need to update the character.
So input of zero will become X.
And what I will do now so I will call Dacogen on this area and Dacogen will replace all the values of
character with simple.
So I will do the small work and the question will do the rest of the work.
Simple.
So let's write the code.
So they're functionally void.
I will not done anything, I will do the changes in the string or the character only, so let's see,
the name of the function is replaced, corrected.
It will take.
But it is in good.
What with be the biscuits, so biscuits is very simple, if my heart is empty, so if there is empty
in zero is nil.
So if there is anybody you do not need to do anything, you will simply return.
That is check.
So the plan is very simple.
I will do the small work on occasion, will do the rest of the work, so I will check at disposition
is present or not, if it's present, I will replace it by X.
Otherwise, I need to call that for the.
The rest of the area, so check if in pataphysical zero, is it to.
The character in that case, you to update unit to replace the character.
By X, so replaced by X.
So you will call litigation, so the question will replace all the character with character and the
ETAs basically in particular one.
And plus one.
So what I'm doing here is I am checking for this value.
I am doing my small work here.
And after doing my small work, I will call dedication for the rest of the day.
So this is input lesson and I think our function will work.
So let's see.
Let's call the function.
So after printing Dylan.
It's called a function of the character.
And I will give it.
And Portelli.
And let us also bring to the area so that we can see so in port.
And let's bring in Proterra before replacing director.
So I'm printing the land, then I am printing the correct Betty.
So I am printing the and then I printing Michaela Pereira, then I will replace all the characters with
character and then I am printing the character again.
So let's see.
So it is waiting for the input, let's say the input is a.
So dentistry, this is before replacing and this is after replacing X, X, X, let's take one more
example.
So a, b, a, b, c, d, the D.
S, f, g.
So let's see whether the output is right or wrong.
So he is replaced by again, replaced by ex, so again, next here and then everything is fine.
So basically our function is working.
So this replace critical function, it is working so much better.
But one example.
Let's bring our function.
Let's take a very small example, so let's take two examples.
This is the first example.
ABC aired the.
So check the first character, first character is replaced by X, so I will replace it by X and then
call the recursion, so I will call that equation someone.
Let me see.
The first character is not doing a thing called recursion.
So the question first character is not a do nothing simple qualification, this Monetti first character
is replaced by X, so I will replace it by X and call that equation.
So I'm quoting that it goes so first character is not so do not think dedication.
So we have none here, so I will call on all.
So similarly we have none at the end.
So whenever you get done, so I will return and I'm not doing anything, so return.
Dun dun dun dun.
And finally, what is my area?
So my ideas for correctness changed X and this has also changed X.
So the character is X, B, X and which is right.
And we know that our past Bio-Reference areas are always masturbator.
So this is the right output.
So let's take one more example.
So this is now look to be the.
EMT, and then we have none, so check the first character.
It is not a do nothing call goes on this morning at NBC first, correct?
Is not there?
Do not call verification.
We have nothing here.
So we have additional first character is replaced by X.
Then called into question this malerie CNN, so first character is not doing a thing called preclusion
onal, whenever you encounter Willerton and you are not doing anything after Director Gengel, so redundant
and written and written.
So what is my final edit?
So this value has been replaced by X, so B, B, Excellency's detailed output.
So basically our function is working.
So this is it from this video.
I will see you on the next one.