We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I think that author has not made any mistakes here..It is properly mentioned in the constraints that
1<=N<=100000
and
also mentioned that ** If there are no elements to the left/right, then the sum is considered to be zero. **
Considering both the statements,above test case is a valid one.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Array
You are viewing a single comment's thread. Return to all comments →
I think that author has not made any mistakes here..It is properly mentioned in the constraints that 1<=N<=100000 and also mentioned that ** If there are no elements to the left/right, then the sum is considered to be zero. ** Considering both the statements,above test case is a valid one.