I have the following problem:
You are given N counters, initially set to 0, and you have two possible operations on them:
Ruby Codility Code that got 100/100
def solution(a) if a.length < 3 0 end a.sort! for i in 2..a.length - 1 if (a[i-2] + a[i-1]) > a[i] return 1 end end 0 end