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.
- Sherlock and Array
- Discussions
Sherlock and Array
Sherlock and Array
Sort by
recency
|
142 Discussions
|
Please Login in order to post a comment
what is the problem in this code it passed all test cases except 2 showing time limit exceeded can someone help def balancedSums(arr): # Write your code here if len(arr)==1: return 'YES' else: a='NO' for i in range(len(arr)): left_sum=sum(arr[:i]) right_sum=sum(arr[i+1:]) if left_sum==right_sum: a='YES' break return a
Python:
C++