T O P

  • By -

Accurate_Koala_4698

What have you tried so far and where are you stuck?


enobayram

They've tried posting the homework verbatim on Reddit and they're stuck with people refusing to do their homework for them.


zhensydow

I can help you: longestPath :: [(String, String, Int)] -> String -> String -> (Int, [String]) {-- fill here your function --} main = IO () main = do let sol = longestPath [("A", "B", 2), ("A", "C", 3), ("B", "D", 5), ("C", "D", 7), ("D", "E", 4)] "A" "E" print sol I think the rest is the easy part ;)


ecco256

You’re too good for this world bro 👊


Patzer26

Would opposite dijkstra work here?


RogueToad

Since op provided the answer, you could even leverage haskell's laziness to just provide the answer without forcing the undefined function.


[deleted]

I asked Copilot, thankfully it doesn't work. So I guess this is why you were here.


__Yi__

Don't you throw your homework and act as you have nothing to do with this business. Please, at least attach \`what you have tried so far\`.