Ad
  • Custom User Avatar

    Output of my Scala refsol matches output of authors original refsol in Python. Being unable to read the description is not an issue.

  • Custom User Avatar

    It appears to me that the Scala solution is correct.

    For Seq("B", "B", "A", "A", "A", "B", "A") I would expect:

    • Pop "B", "B" from index 0 => Seq("A", "A", "A", "B", "A")
    • Pop "A", "A", "A" from index 0 => Seq("B", "A")
    • Nothing more to pop; return Seq("B", "A")

    when I test the reference solution popBlocks(Seq("B", "B", "A", "A", "A", "B", "A")) => Seq("B", "A")

    Do you expect something different? If so, what?

  • Custom User Avatar

    Just for completeness: you mean Scala tests, right?