Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This assignment is testing backtracking. Your code should step through, location by location in the star, through the 1 2 locations and try all of
This assignment is testing backtracking. Your code should step through, location by location in
the star, through the locations and try all of the possible numbers that are not yet filled in
Clearly, trying all possibilities leads to possible options, which would take too long to evaluate.
Thus, in some instances, you may be able to decide that even though a number hasnt been placed
yet, its impossible for it to be in the current slot and for the puzzle to be solvable.
Hint: There is a way to determine the magic sum before placing any numbers!
If you code the problem appropriately, then any individual puzzle should be solved in under a
second. Our input has test cases. The total time limit will be set to three times my Arups
solution.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started