In this example, we prove that the maximum value of [2, [1, []]] is 2. We start with just the innermost element, which is 1. We know that the maximum of [1, []] is 1.

Next, we know that 2 is greater than the maximum of [1, []] since the maximum of [1, []] is 1 and 2 > 1. Then we conclude that the maximum of [2, [1, []]] is 2.

Quiz (1 point)

Prove that:
maximum value in stack [ 2, [ 1, [ ] ] ] = 2

The following properties may be helpful:

Please write your proof in the table below. Each row should contain one claim. The last claim is the statement that you are trying to prove.

Step Claim Reason (optional) Error Message (if any)
1
2
3
4
5
6
7
8
9
10

Become a subscriber to save your progress, see the correct answer, and more!