dark___horse's blog

By dark___horse, history, 3 years ago, In English

Last testcase giving TLE . please help I have been trying to find the error for a long time now.

My Solution

Problem

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By dark___horse, 3 years ago, In English

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?

link to the problem

my accepted solution to the problem

Thanks in advance!!

Full text and comments »

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