If I have two arrays.For example,
One array is int[] one={1,2,4,6,54,3,34}; the other is int[] two={12,1,2,4,7,8,54,3,34,5};
The problem is how can I get "the same parts" between one and two.
"The same parts" in the example are [1,2,4] and [54,3,34].
P.S.You can use pseudo language ,c,c#,java,php or other language.
P.S. Now I make clear the same parts.the same parts elements have the lists.
P.S.I have change the example,and value of each item in the array isn't equal (You can see my example.)
- at least two items match
- the index of the match item in the two arrays not necessary to match ,but the same parts must be continuous.