Challenge: (Medium)
Given a balance parentheses string of a binary tree, produce the equivalent ASCII art version.
Examples
Input: (xx)
Output:
/\
Input: (x(xx)}
Output:
/\ /\
Input: ((xx)(xx))
Output:
/\ /\/\
Input: (x(x(xx)))
Output:
/\ /\ /\
This post has been edited by AdamSpeight2008: 31 January 2014 - 06:07 PM