Puzzle DC22


Find the largest element in an integer array between two indices

[E-10] Write function, similar to the previous, that finds the largest element in a sub-array of an integer array. The sub-array consists of the array cells indexed between indices low and high, inclusive. Here is the output of a testing program, where low==10 and high==19.

  34   59   69   19   83   25   99   23   36   33
  17   36   35    1   72   28   69   30    9   85
  59   64   33   37   49   19   88   13   99   33
  73   28   85   59   26   34    8   63   88   34
  25   44    9   86   82   43   85    6   80   53
  83   96   57    2   65   89   97   14   55   64

Max = 85


Answer         Next Page         Previous Page Home