Supppose somenone give me an array up to 10^6 elements . Then gave some quiries up to 3000 , quries will like that from I index to J index sort in descending , or Ascending order . If 1 ascending , if 2 descending . After quiry how will look the array ? Print the array .
There has a problem like that -> Report . But i want not from 0 index i want from any I to J index .
How i can solve this problem without using STL sort . In efficient way .