Skip to content

Backtrex.solve/1 should return a Stream of solutions #2

@jmitchell

Description

@jmitchell

Problems can have multiple solutions, but Backtrex currently returns the first one it finds. Instead it should return a lazy Stream of all of solutions (even if there's infinitely many!). It should also provide a function to get the first n solutions and the Stream of the remaining solutions.

Conceptually all this should require is upon finding a solution...

  1. enqueue it and
  2. backtrack to the next possible state

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions