Question: The puzzle format As mentioned earlier, we will start with a completed puzzle stored in a four-element vector called puzzle where every element is itself

 The puzzle format As mentioned earlier, we will start with acompleted puzzle stored in a four-element vector called puzzle where every element

The puzzle format As mentioned earlier, we will start with a completed puzzle stored in a four-element vector called puzzle where every element is itself a four-element vector, such as 2 4 13 1 3 2 4 3 2 4 1 4 | 1 3 2 Each row of the puzzle will correspond to an element of a vector, e.g. the first row of the Pseudoku puzzle will be stored as a four-element vector, which itself is an element of a four-element vector. Therefore, this completed Pseudoku puzzle is represented by the following vector: Element 1 2 4 3 Element 2 1 3 2 4 Element 3 3 2 4 1 Element 4 4 3 2 We could make this vector by initiating a four-element vector, with each element being empty, and then assign a vector to each element. The goal of the algorithm in this coursework is to generate an unsolved Pseudoku puzzle from a row of four numbers. The first step in the process is to make all four elements of a four-element vector to be the same, and this element will be a four-element vector. For example, given a four-element vector with the numbers 2, 4, 1, 3, we produce the following vector: Element 1 2 Element 2 2 4 1 3 Element 3 2 4 1 3 Element 4 2 Your first task is to write a function in pseudocode that will carry out this process. Task 1: Complete the following function template: function MAKEVECTOR(row) new Vector puzzle(4) end function This function should take a four-element vector called row an input parameter and return a vector of four elements called puzzle: each element of puzzle should contain the four-element vector row. Complete this function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!