Ok, i can't sort the given array, can't create auxiliary array. What am I suppose


#1

Ok, i can’t sort the given array, can’t create auxiliary array. What am I supposed to do ??


#2

you can use binary search on solution’s all possible values or raise a seek help request for full approach


#3

Paras Meena But binary search is for sorted array. And I can’t tamper with the given array. Was reading an algorithm (medians of medians) but that too uses extra space.


#4

You can use Collections.sort() method in java…that makes this a 2 line code.


#5

You can’t, the Vector is"Final" i.e. “READ ONLY” so you can’t sort/ modify it.