I’ve written the program to convert infix notation to Reverse Polish Notation ( http://www.codechef.com/problems/ONP/ ) in Java. Since I’m new to learning data structures/ how this problem works, I made my own stack and queue for the program. It works perfectly fine for the test cases provided, but I get a runtime (NZEC) error when I submit it.
Could anyone give me any idea why? Are there test cases without parentheses in the correct place, or test cases with numbers instead of variables?
My solution: http://www.codechef.com/viewsolution/4294815