Hello, everyone.
So in this video, we are going to solve another question, and the name of the question is basically
unique, but.
So the name of the question is unique, but.
Let me explain you the question.
So in the question, we are provided with morals and greed.
OK, fine.
So we have agreed.
And the dimensions of great are McCrossin simple, so there is one robot and this robot is basically
present at the top left corner.
So this robot is present here.
OK, so this robot and the index are zero zero.
And this robot basically is trying to reach the bottom right corner of the grid.
And the index for this one will be at minus one and minus one.
Now, what we need to do, we need to find out how many unique possible parts will be there.
And it is given that a robot can move only in two direction, robot can move in this direction and robot
can move in this direction.
So there are two directions in which the robot can move.
Either you can move down or you can move right from any given point.
And we need to find out how many unique possible parts will be there.
So this is standard depiction.
This is standard precaution, I'm explaining the logic and you will be writing the code for this problem
yourself, so.
Let's see, so far reaching this particular index.
If I want to reach here.
How many unique possible parts will be there, so to reach this index, you can basically come from
the index above it and from the index left of it.
OK, so.
I want to reach this index so you can come from here from above or you can come from left because these
are the only two directions allowed.
So it will come from left or so.
A number of ways to reach this index will be the number of ways to reach this index, plus the number
of ways to reach this index.
Simple, right?
So what will do we will create are two really are two, three and four to DPRK for filling what Depfa
is able to present, what it will represent.
It will represent the number of unique parts to reach accommodation.
OK, so Depfa is going to represent NAMAROFF of unique but.
To reach.
Index.
Ikoma and.
This is a comedy, so I can come from the top or I can come from left.
So basically I will be Bartolomé recursive relation.
I will be either I will come from top or I will come from left.
Sleepify minus Maji plus deep off I and G minus one.
So this is our definition.
This is symbolic assimilation.
And what will be our answer?
Our answer will be basically DPF and minus one and and minus one.
Right.
But we need to do we need to find out the number of unique possible paths to reach this index, the
last index.
Right.
And what is the definition?
Definition is number of unique part to reach Index A..
So I want to reach this index, which is at minus UNadministered.
So our answer will be DPF and minus and minus number of unique, but to reach index and minus one,
comma and minus one.
OK, so this is a very simple problem.
You can write the code for yourself and if you face any problem, then you can watch my code in the
next video.
So this is it about this video.
I will see you in the next one.
Thank you.