You are right about the maximum number of extra chars. I see mathematically, the limit value for total chars needed is 3 * (n - 1) when n goes towards infinitely great.
But I still wonder how you can manage to code it :)
Output contest matches
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.