epibook / epibook.github.io

Publishes to Github Pages
335 stars 238 forks source link

Fixed a bug where the weakest equivalence relation wasn't being updated #2

Closed JohnKurlak closed 10 years ago

JohnKurlak commented 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.