Quiz (1 point)
Prove that:
remaining elements after [ 2, [ 1, [ ] ] ] is popped at index 0 and visited stack is [ ] = [ 1, [ ] ]
The following properties may be helpful:
- remaining elements after [ x, xs ] is popped at index 0 and visited stack is ys = reverse of (result of dumping xs to ys)
- result of dumping [ y, [ ] ] to xs = [ y, xs ]
- reverse of [ x, [ ] ] = [ x, [ ] ]
if result of dumping [ 1, [ ] ] to [ ] = [ 1, [ ] ], then reverse of (result of dumping [ 1, [ ] ] to [ ]) = reverse of [ 1, [ ] ]
if the following are true:
- a = b
- b = c
then a = c
if the following are true:
- a = b
- b = c
then a = c
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.