_punk's blog

By _punk, history, 5 years ago, In English

Can someone please help me out to understand the solution of 340 C -- TOURIST PROBLEM solution given below:

LINK

THANKS IN ADVANCE :)

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it

By _punk, history, 5 years ago, In English

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 :)

Full text and comments »

  • Vote: I like it
  • +12
  • Vote: I do not like it