How many swaps are required for reversing an array having n elements where n is an even number?
(a) (n-1) / 2
(b) n/2
(c) (n/2) – 1
(d) (n+1)/2
Question is from Arrays Types in chapter Arrays Types of Data Structures & Algorithms I
I had been asked this question in unit test.