What should be the pattern of "ABC", 2?
I suppose it to be
and return "ABC".
Why is the answer "ACB"?
With the input
"ABC", 2, it is written in zigzag pattern as following:
A C | / B
Therefore, the output should be
"ACB", as read horizontally by row.
Yeah, why not:
Just like the example showing, the upper one has some indents.
Edit: Now that I've seen https://leetcode.com/discuss/55208/if-you-are-confused-with-zigzag-pattern-come-and-see I think the problem description needs to be rewritten to be clearer.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.