Mid point technique is not working when the length is an odd number

link to the code.


fixed it
pease mark the doubt as resolved if you find it helpful

Its still not working