Skip to content

Instantly share code, notes, and snippets.

@BrongoObenge
Created March 8, 2016 16:52
Show Gist options
  • Save BrongoObenge/a326611abf9ab58b5b1a to your computer and use it in GitHub Desktop.
Save BrongoObenge/a326611abf9ab58b5b1a to your computer and use it in GitHub Desktop.
Idee:
Loop de twee lists beide kanten op(Vergelijk x met y en y met x) en add the null values als een rating met de rating 0.
Code: https://spit.mixtape.moe/view/276dbc3e
Repo: https://bitbucket.org/Jiar/datasci1/src/03c55b390bd96f8511624b6d92ac68e381c64237/src/main/java/nl/hro/datasci/web/Controller.java?at=master&fileviewer=file-view-default#Controller.java-66:75
RESULT:
BEFORE:
-----------
Y: Articles=[101, 103, 104, 105, 106, 102, ] Total: 6
X: Articles=[101, 102, 104, 106, ] Total: 4
X and Y have the next article's in common: [101, 104, 106, 102, ] Total: 4
AFTER:
-----------
Y: Articles=[101, 103, 104, 105, 106, 102, ] Total: 6
X: Articles=[101, 102, 104, 106, 103, 105, ] Total: 6
X and Y have the next article's in common: [101, 103, 104, 105, 106, 102, ] Total: 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment