Closed JohnKurlak closed 10 years ago
With the old code, if you reverse the order of the lists, you get the wrong answer.
e.g.: List A = Arrays.asList(6, 3, 5, 1); List B = Arrays.asList(5, 0, 1, 2);
Outputs: [0, 1, 1, 0, 4, 1, 5]
Instead of: [0, 1, 1, 0, 4, 1, 1]
This commit fixes that. The equivalent C++ doesn't have the same problem.
With the old code, if you reverse the order of the lists, you get the wrong answer.
e.g.: List A = Arrays.asList(6, 3, 5, 1); List B = Arrays.asList(5, 0, 1, 2);
Outputs: [0, 1, 1, 0, 4, 1, 5]
Instead of: [0, 1, 1, 0, 4, 1, 1]
This commit fixes that. The equivalent C++ doesn't have the same problem.