$ 0 0 I was doing this question. I implemented the same codes in Java and C++. This java code gives RE while the same code when implemented in C++(here) gives AC. Why is this happening?