The Gateway to Computer Science Excellence
0 votes
212 views

closed as a duplicate of: TIFR2011-B-30
in Programming by (195 points)
closed by | 212 views

2 Answers

0 votes
Best answer

Answer : B

Because A and B both contains same data if we consider each element of A contains distinct values.

For example :

by (159 points)
selected by
+1 vote
Given that array is start from 1 to n

let assume A[i] = x; therefore where can be this x in sorted array ? it is at xth position

B[x]=x but we are getting B[x]=i ===> option A is wrong

Note that A[i] given different results because of no repetition of numbers.. that implies every index of B is accessed and moreover we fill the index of B with i which is different ===> B contains the permutation order of A
by Veteran (65.7k points)
0
option b is right??

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,368 answers
198,503 comments
105,271 users