previous | start | next

Answers

  1. Because we don't know whether the next input is a number or the letter Q.
  2. No. If all input values are negative, the maximum is also negative. However, the maximum field is initialized with 0. With this simplification, the maximum would be falsely computed as 0.


previous | start | next