Initialise two pointers
left , right = 0 , 0 NEW_LINE if ( n % 2 == 0 ) : NEW_LINE INDENT left = 1 NEW_LINE right = n - 1 NEW_LINE DEDENT else : NEW_LINE INDENT left = 1 NEW_LINE right = n - 2 NEW_LINE DEDENT