For any a,b,c -- বড় সাইড টা, অন্য দুই বাহু থেকে যোগ থেকে ছোট হবে।

If a greater of them, a < b+c





worst case 1st,2nd and last one . if we replace with other to fix, entire array will be valid


WE have find largest valid sub-array, bakigula dui pashe replace korlei entire array valid hobe





Here
we can seeing , Specifiq block is only TRUE then false , its called predicted function. we can apply Binary search on that block to find largest Sub-array . For every i, kon block ta sobcheye boro hooche TRUE

We cant use sliding window as Within sub array any 3 have to form triangle but sliding window check any adjacent 3, so it can be wrong



Leave a Comment