HackerRank #Python #파이썬 #해커랭크1 HackerRank / Sherlock and Array / Python https://www.hackerrank.com/challenges/sherlock-and-array/problem?isFullScreen=true Sherlock and Array | HackerRank Check whether there exists an element in the array such that sum of elements on its left is equal to the sum of elements on its right. www.hackerrank.com def balancedSums(arr): for i in range(len(arr)): if i == 0: left = 0 right = sum(arr[i+1:]) if left == right: return 'YES' elif i.. 2021. 12. 24. 이전 1 다음