Flipkart coding test problem... Need help
Difference between en5 and en6, changed 12 character(s)
I appeared for Flipkart coding test day before yesterday and got stuck on this problem:<br>↵
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 tell what is the shortest path from a starting node A to an ending node B after performing atmost K moves.<br>↵
1<=n<=1000<br>↵
0<=K<n<br>↵
1<=m<=10000<br>↵
1<=w<=10^9 (weight of edge) <br>↵
Can anybody please tell me how to approach this problem?<br>↵
I found this problem on [quora](https://www.quora.com/Given-an-N-vertex-weighted-graph-if-we-can-change-the-weight-of-K-of-the-edges-to-zero-what-is-the-shortest-path-from-1-to-N) also but couldn't understand the approach clearly.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en8 English Rock2000 2020-09-04 16:42:21 40
en7 English Rock2000 2020-09-04 16:34:34 3013
en6 English Rock2000 2020-09-04 13:53:32 12 Tiny change: '1000<br>\n1<=m' -> '1000<br>\n0<=K<n<br>\n1<=m'
en5 English 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 English Rock2000 2020-09-04 11:08:52 93
en3 English Rock2000 2020-09-04 11:06:41 5 Tiny change: 'm-1-to-N) but could' -> 'm-1-to-N) also but could'
en2 English Rock2000 2020-09-04 11:05:06 231
en1 English Rock2000 2020-09-04 10:58:21 438 Initial revision (published)