How to approach this problem; (Stinrg with only boolean operators and operands). The string is always has balanced paranthesis. It seem infix to prefix, but is there an alternate way
'''Input: ( A AND B ) OR ( ( ( A AND B ) OR ( C OR D ) ) )
Output:
OR
AND
A
B
OR
AND
A
B
OR
C
D
'''