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?
I don’t want to spoil your learning by showing an example or fixing your code. Instead I will give provide you wiki article on algorithm to be used. Try to implement it.