CMU 15-112 Summer 2020: Fundamentals of Programming and Computer Science
Homework 9 (Due Tue 9-Jun, at 5:00pm)




  1. bestScrabbleScore() [5 pts - Bonus]
    In Go, write bestScrabbleScore() from hw4 with a few changes. Rather than returning a tuple, have two return values: ([]string, int) in all cases. When there are no available words, return an empty slice and zero as your score.

  2. isKingsTour() [5 pts - Bonus]
    In Go, write isKingsTour() from collab5.

  3. makeMagicSquare() [5 pts - Bonus]
    Write the function makeMagicSquare(n) that takes a positive odd integer n and returns an nxn magic square by following De La Loubere's Method as described here. If n is not a positive odd integer, return an empty slice.