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.
- Prepare
- Algorithms
- Search
- Sherlock and Array
- Discussions
Sherlock and Array
Sherlock and Array
Sort by
recency
|
942 Discussions
|
Please Login in order to post a comment
Java
NEW
low,high=0,len(arr)-1 sumleft=arr[low] sumright=arr[high] while low!=high: if sumleft < sumright: low=low+1 sumleft+=arr[low]
C++ (more at https://github.com/IhorVodko/Hackerrank_solutions/tree/master , feel free to give a star :) )
} return "NO"; } }