Report Bug
Qus : To reverse the order of elements in an array, the algorithm must swap elements between:
QusArray elements को reverse order में rearrange करने के लिए algorithm को किन elements के बीच swap करना चाहिए?

A. Adjacent indices
B. First and last, second and second-last, etc.
C. Random indices
D. Even indices only


Solution
B. First and last, second and second-last, etc.



Explanation
Reversal is achieved by repeatedly swapping elements from opposite ends.

Array reverse करने के लिए first-last, second-second-last आदि elements swap किए जाते हैं।



Report Bug