Thank you, for the prompt response, I figured out where the stack was accessing out of bounds and made changes accordingly. But now my solution isn’t being accepted despite it running all the my sample cases correctly.
This is my updated solution: https://www.codechef.com/viewsolution/37396874
My Test Cases
8
15
((A+B)D)^(E-F)
19
A+(BC-(D/E^F)G)H
11
A+B(C^D-E)
5
AB+C
7
A*(B+C)
5
A/BC
5
A/B^C
9
A-(B/CD)