whenever you are doing a question in which addition to a string requires , that is , we have to add an character into a string or we have to insert into a stack. Then instead of using '+' operator go for push_back. this help in lot of questions where you are doing a lot of '+' operation in a string. i got this when i was solving a question on geeks and i found TLE many times. Then I tried roughly push_back, and BOOM it worked XD. Thats where i learnt when you are not getting your answer when you are right , then go for rough guesses.
HAPPY CODING :)
You can use += also. This hack allows you to add a string to the right for O(the length of the string wich you want to add). For example, a += b working for O( len(b) )
Thats where i learnt when you are not getting your answer when you are right , then go for rough guesses.
Shit one says when he/she don't know computer science.
tfw u have a 30 line segtree dp and u swear its an off by 1 error
that was just for fun mate!!!!.. i know pretty well that everything goes with logic!!!
Sure. But the way you wrote your post tells me that you don't have a very good grasp in C++ like many others who just code blindly without reading the STL docs.
onwards to glory bro!!:)... ahh but not like others who just keep rolling their fingers on keyboard to get ACCEPTED..