Last testcase giving TLE . please help I have been trying to find the error for a long time now.
Last testcase giving TLE . please help I have been trying to find the error for a long time now.
Given a directed and weighted graph without negative edges in it with n nodes, a source and a destination, what is the shortest path from source to the destination when we are allowed to visit at most k nodes?
Can someone suggest better ways I can use to solve this problem?
my accepted solution to the problem
Thanks in advance!!