munni11
Programmer
- Jul 16, 2008
- 1
subsequence (list1,list2) is satisfied if the elements of list1 occur in the same order in list 2 . That means that whenevr x precedes y in list 1 x occurs before y in list2. fro example subsequence ([a,b,c],[1,a,2,3,b,4,5,c,6]) is satisfied becuase in the second list a occurs before b and b occurs before c. The first list may have duplications, so
subsequence ([a,b,a,c],[a,1,c,2,a,b,3,4,b,4,c,5,6,a,7,c])is satisfied because the first a the first b the third a and the third a have same order in second list as in the first.
COuld you please guide me on how to test these goals
1)subsequence ([a,b,c],[1,2,3,c,a,4,5,b])
2)subsequence ([a,b,a],[b,1,2,a,4,5,a])
subsequence ([a,b,a,c],[a,1,c,2,a,b,3,4,b,4,c,5,6,a,7,c])is satisfied because the first a the first b the third a and the third a have same order in second list as in the first.
COuld you please guide me on how to test these goals
1)subsequence ([a,b,c],[1,2,3,c,a,4,5,b])
2)subsequence ([a,b,a],[b,1,2,a,4,5,a])