Skip to content
Snippets Groups Projects
Commit 632397c0 authored by Mikaël Mayer's avatar Mikaël Mayer
Browse files

fixed StringMinChange

parent 040f8af4
No related branches found
No related tags found
No related merge requests found
......@@ -252,11 +252,11 @@ T2: ret Pop() -> 5"""
val v = idMap("v")
val w = idMap("w")
val solutions = solveMinChange(problem, Map(u -> "a", v -> "b", w -> "c"))
solutions(0) should equal (Map(v -> "kb"))
solutions(1) should equal (Map(u -> "ak"))
(2 to 5).toSet.map((i: Int) => solutions(i)) should equal (Set(Map(v -> "", w -> "kbc")
, Map(v -> "k", w -> "bc")
, Map(v -> "kb", w -> "c")
, Map(v -> "kbc", w -> "")))
solutions(0) should equal (Map(u -> "ak"))
solutions(1) should equal (Map(v -> "kb"))
(2 to 5).toSet.map((i: Int) => solutions(i)) should equal (Set(Map(u -> "", v -> "akb")
, Map(u -> "a", v -> "kb")
, Map(u -> "ak", v -> "b")
, Map(u -> "akb", v -> "")))
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment