For n = 3 arr = { 70, 60, 50 }; //index starts from 1
- we have to compare indices 2 and 3
For n = 4 arr = { 70, 60, 50, 55 }; //index starts from 1
- we have to compare indices 2 to 4
For n = 5 arr = { 70, 60, 50, 55, 40 }; //index starts from 1
- we have to compare indices 3 to 5
For n = 6 arr = { 70, 60, 50, 55, 40, 30 }; //index starts from 1
- we have to compare indices 3 to 6
For n = 7 arr = { 70, 60, 50, 55, 40, 30, 20 }; //index starts from 1
- we have to compare indices 4 to 7
So the second minimium can be found clearly within this range of indices CEIL(n/2) to n.