Please Solve this Online Round Qn

Revision en2, by Ferrarixxx, 2020-08-23 23:56:25

Internship Online Round Problem

Given an Array of n elements s.t sum of (i)th and (n-i)th element is same for all i. (considering 1 indexed here).Then one element was removed from this array.

Now you are presented with n-1 elements and you need to find that missing element.
How will you do it?? (range of N is -> 10^5)

(Please give code as well if u can) :)

Thanks in Advance :)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Ferrarixxx 2020-08-23 23:56:25 5 Tiny change: '.t sum of ith and n-ith element' -> '.t sum of (i)th and (n-i)th element'
en1 English Ferrarixxx 2020-08-23 23:55:45 430 Initial revision (published)