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.
Prison Transport
Prison Transport
Sort by
recency
|
18 Discussions
|
Please Login in order to post a comment
scala
Hi guys! In my opinion, some test case data are not following common sense rule. How many hands have inmate? Rather not more than 2. So how many pairs can inmate create - in my opinion also 2. But in TC3 data points that inmate 22 is cuffed with 5 other inmates! Click here to know more
This is a chart issue. Detainees are vertices and chains are edges. All we really want is to work out the size of each component(group of detainees) of the diagram, then compute cost of a transport for that limit, and total all expenses.click here
This is a Disjoint Set problem, one of the few data structures that are specifically imperative, so I wonder why this problem is in the "Functional Structures" category. Anyways, here is my Haskell solution using mutable arrays to implement DSU:
can do this in 10 lines using
import Data.Graph (buildG, scc)
in Haskell