Convert to Polynomial-Time Algorithm
This converts the main solution to use a polynomial-time algorithm instead of the exponential backtracking algorithm.
This converts the main solution to use a polynomial-time algorithm instead of the exponential backtracking algorithm.