CDUTSV04 Help needed

I cannot think of a method to start. Could someone give me a hint which i can think on??’
I dont want the entire solution , just a little nudge in the right direction.

I’ll just post a few links:

You can also google other ways to solve the problem. I used the following way:

  1. Convert infix to postfix :
  2. Convert postfix back to infix:

The only problem is the extra parentheses that the gfg code outputs. You may handle it as follows:

There were already many java codes available on the internet to solve this problem, but I’m not a java coder so had to code it from scratch, since I didn’t know of the spoj problem during the contest.

Here’s my code:

Thanks , i will study them :smiley:

Hey ,i m new to competitive coding. Could u give me some tips to improve my problem solving?

The best I can give is:


Solve more problems.

LoL, right what i expected :sweat_smile: