If sum is greater than K
if ( leftSum + rightSum > K ) : NEW_LINE INDENT break NEW_LINE DEDENT if ( leftTaken + rightTaken <= N ) : NEW_LINE for i in range ( leftTaken ) : NEW_LINE print ( A [ i ] , end = " ▁ " ) NEW_LINE for i in range ( rightTaken ) : NEW_LINE print ( A [ N - i - 1 ] , end = " ▁ " ) NEW_LINE