We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I am not sure that this particular challenge should be listed under "easy" as written. All the other challenges up to this point have been straightforward "in the head" problems. This one requires quite a bit more set-up.
The "easy" portion of this task is to evaluate cost as defined is simply comparing lists of lists (in python, anyway). Generating the matrix of possible magic squares is far more time-consuming than anything up to this point, and might best have been it's own "Generate 3x3 Magic Squares" challenge, with "Magic Square Forming" following directly after.
Were I to see this particular excercise in a "team-coding" evaluation for a job interview, my first suggestion to my partner would be to google for the list of possible 3x3 magic squares and just use that as a look up table, since the boundaries are well understood and fast and lazy will always win!
Forming a Magic Square
You are viewing a single comment's thread. Return to all comments →
I am not sure that this particular challenge should be listed under "easy" as written. All the other challenges up to this point have been straightforward "in the head" problems. This one requires quite a bit more set-up.
The "easy" portion of this task is to evaluate cost as defined is simply comparing lists of lists (in python, anyway). Generating the matrix of possible magic squares is far more time-consuming than anything up to this point, and might best have been it's own "Generate 3x3 Magic Squares" challenge, with "Magic Square Forming" following directly after.
Were I to see this particular excercise in a "team-coding" evaluation for a job interview, my first suggestion to my partner would be to google for the list of possible 3x3 magic squares and just use that as a look up table, since the boundaries are well understood and fast and lazy will always win!