code–https://ide.codingblocks.com/s/387922
ques–given in the video@ 56:55
Lexicographic printing of the shortest path
TLE is coming ,although have followed the same method
the termination condition of while loop is wrong .
u will get \n in ch only when u will have more than one lines(in ur input u only have single line).
use cin.getline to read complete string at once.
and then iterate the string to executr ur logic
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.