plz explain how option b is correct
Problem in vector quiz Q7
@Rishabh-sahai, if we don;t provide any comparator to the sort function then it will compare w.r.t the first element of the pair by default . so to remember its previous indexes we made vector of pair where the first value corresponds to value and second index corresponds to its index in the original value and finally we sorted the array using stl function which is option (2)
In case of any doubt feel free to ask 
If you got the answer then mark your doubt as resolved
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.