Flipkart coding test problem... Need help

Правка en2, от Rock2000, 2020-09-04 11:05:06

You are given an undirected weighted graph with n vertices and m edges. In one move you can make any edge weight zero. You can perform atmost K moves. You have to out what is the shortest path from a starting node A to an ending node B after performing atmost K moves.
1<=n<=1000
1<=m<=10000
1<=w<=10^9 (weight of edge)
Can anybody please tell me how to approach this problem?
I found this problem on quora but couldn't understand the approach clearly.

Теги #flipkart, #help

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en8 Английский Rock2000 2020-09-04 16:42:21 40
en7 Английский Rock2000 2020-09-04 16:34:34 3013
en6 Английский Rock2000 2020-09-04 13:53:32 12 Tiny change: '1000<br>\n1<=m' -> '1000<br>\n0<=K<n<br>\n1<=m'
en5 Английский Rock2000 2020-09-04 11:11:13 5 Tiny change: 'u have to out what is t' -> 'u have to tell what is t'
en4 Английский Rock2000 2020-09-04 11:08:52 93
en3 Английский Rock2000 2020-09-04 11:06:41 5 Tiny change: 'm-1-to-N) but could' -> 'm-1-to-N) also but could'
en2 Английский Rock2000 2020-09-04 11:05:06 231
en1 Английский Rock2000 2020-09-04 10:58:21 438 Initial revision (published)