You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// given an array with all the elements are positive.
// check if elements can form a triangle.
// return an array called res, with length of arr.length-2, and res[i] = 1 if it is possible to form a triangle with arr[i] arr[i+1], arr[i+2], otherwise 0;