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.
Thanks

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 : Convert Infix expression to Postfix expression - GeeksforGeeks
  2. Convert postfix back to infix: Postfix to Infix - GeeksforGeeks

The only problem is the extra parentheses that the gfg code outputs. You may handle it as follows: java - Postfix to Infix with minimum number of parentheses - Stack Overflow

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: CodeChef: Practical coding for everyone

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:

Spoiler

Solve more problems.

LoL, right what i expected :sweat_smile: