COMP225 Practical Exercises for Week 5

  1. (*) Implement question (3) from the tutorials using the brute-force method and the iterative method.

  2. Adapt your program so that it can compute the optimal next move for the player if he is at position (i, j).

  3. Now adapt your recursive implementation so that it also computes the number of recursive calls for your reursive implementation. Do some experiments with some inputs to demonstrate experimentally how the number of recursive calls grows as the input grows.

    All enquiries to Annabelle McIver