Page 707 - AP Computer Science A, 7th edition
P. 707

35. (E) For each element in a, found is switched to true if that element is found anywhere in b. Notice that for any element in a, if it is not found in b, the method returns false. Thus, to return true, every element in a must also be in b. Notice that this doesn’t necessarily mean that a and b are permutations of each other. For example, consider the counterexample of a= [1,1,2,3] and b=[1,2,2,3].


































































































   705   706   707   708   709