Блог пользователя _punk

Автор _punk, история, 5 лет назад, По-английски

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

LINK

THANKS IN ADVANCE :)

Полный текст и комментарии »

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

Автор _punk, история, 5 лет назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +12
  • Проголосовать: не нравится