Short Problem Definition:
Tie adjacent ropes to achieve the maximum number of ropes of length >= K.
expected worst-case time complexity is
expected worst-case space complexity is
I am a bit skeptical about the correctness of my solution. It gets 100/100 through…
def solution(K, A): cnt = 0 current = 0 for part in A: current += part if current >= K: cnt +=1 current = 0 return cnt