CSCI 1120 (Low-Level Computing), Fall 2021:
Homework 5 Solution

  1. (10 points)

    Refer to assignment for description of problem.

    Solution:

    Here are two solutions, the first the one I had mind, and the second also using pointers, in combination with recursion. (The recursive version is probably not very efficient, but I think it's kind of pretty. It was inspired by a student solution some years ago; I hadn't thought of using recursion!)




2021-10-28