Ok so we start with small array of size n = 3
Let the array A looks like:-
and Let array B is empty:-
Now in the question, it is given that we will be going to fill the array B with the following equation i.e.
B[A[i]] = i / for all i and i = 1,2,3
Now consider the following table to fill the array B
i |
A[i] |
B[A[i] = i |
View of Array B |
1 |
3 |
B[3] = 1 |
{_ , _ , 1} |
2 |
1 |
B[1] = 2 |
{2 , _ , 1} |
3 |
2 |
B[2] = 3 |
{2 , 3 , 1} |
now after that array B will look like this-
you can see that this is also an permutation ( or another way of arranging the elements) of the elements 1,2,3.
Or in other words, you can say that it is a permutation of array A.
Hence answer is Option B)
Hope this helps ...