For each mid finding sum1 of sub array less than or equal to k
if ( v [ mid ] - val <= k ) : NEW_LINE INDENT lo = mid + 1 NEW_LINE ans = mid NEW_LINE DEDENT else : NEW_LINE INDENT hi = mid - 1 NEW_LINE DEDENT