Skip to content

metantonio/dijkstra-algorithm

Repository files navigation

Install project

poetry install

Run Algorithm

poetry run python ./dijkstra.py

To find the shortest path between Alice and David.

Exercise proposition:

  • Imagine every person starts with a distance of 100 between them.
  • Every time that a person have an interaction with another, the distance between them is reduced by:
    distance = 100/(N+1)

    Where N = number of time that the user has share something with that user.
  • If distance between 2 users that never shared directly, is less or equal than 40, that user should appears as suggestion.
  • If distance between 2 users that never shared directly, is less or equal than 10, that user should appear as recommendation as friend.

Solution for the exercise:

poetry run python ./exercise.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages