Question: 2 The idea was to write a program which allocates the integers 1-8 to the squares in the figure above. meant vertically, horizontally, or diagonally
2 The idea was to write a program which allocates the integers 1-8 to the squares in the figure above. meant vertically, horizontally, or diagonally We used an array int Qf8) to correspond to the sub-squares in the cross and the helper aray a: to the restrictions that no two adjacent squares contain consecutive integers. By adjacent we int al8115]- 2 (0-1, (012,1, C(2,3,4,-1), (3,4,5,6,-1) Question: 1. Using the array a(8]15], show which sub-square of the cross correspond to which value ofarray Ql). Write your answer in the diagram above. Part 2 must be correct in order to get credit for part 1. (5 points) 2. Explain in detail (and by example) how you determined this correspondence. (10 points) 2 The idea was to write a program which allocates the integers 1-8 to the squares in the figure above. meant vertically, horizontally, or diagonally We used an array int Qf8) to correspond to the sub-squares in the cross and the helper aray a: to the restrictions that no two adjacent squares contain consecutive integers. By adjacent we int al8115]- 2 (0-1, (012,1, C(2,3,4,-1), (3,4,5,6,-1) Question: 1. Using the array a(8]15], show which sub-square of the cross correspond to which value ofarray Ql). Write your answer in the diagram above. Part 2 must be correct in order to get credit for part 1. (5 points) 2. Explain in detail (and by example) how you determined this correspondence. (10 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
