We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The edges will be same as original adjacency list with extension of all 2^K states at one node , That is you there is edge (u,v,c) in the list then there will be (u,i) --> (v,i + items[u]) with cost c and the reverse edges in v,i+items[u] .
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Synchronous Shopping
You are viewing a single comment's thread. Return to all comments →
The edges will be same as original adjacency list with extension of all 2^K states at one node , That is you there is edge (u,v,c) in the list then there will be (u,i) --> (v,i + items[u]) with cost c and the reverse edges in v,i+items[u] .