homework2

1 左边的程序fault是for中 i>0;右边fault是for中数组从头至尾循环  和 return -1 放在了for里面。

2 左边test:x[3,5,2]; y=2 expected=2.  右边test:x=[0,1,1] expected=0;

3 左边test:x[3,5,2]; y=1 expected=-1. 右边test:x=[0,1,1] expected=0 或 test:x=[1,1,1] expected=-1

4左边test:x[1,1,2]; y=1 expected=1. 右边 test:x[1,1,1]; y=1 expected=-1.

 

posted @ 2016-03-17 23:37  咸_鱼  Views(148)  Comments(0Edit  收藏  举报