Skip to content

Find whether individual x is a friend of individual y #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hamidgasmi opened this issue Feb 24, 2020 · 0 comments
Open

Find whether individual x is a friend of individual y #33

hamidgasmi opened this issue Feb 24, 2020 · 0 comments
Assignees

Comments

@hamidgasmi
Copy link
Owner

This problem is available here

Consider a situation with a number of persons and following tasks to be performed on them.

  • Add a new friendship relation, i.e., a person x becomes friend of another person y.
  • Find whether individual x is a friend of individual y (direct or indirect friend)

E.g.
We are given 10 individuals: a, b, c, d, e, f, g, h, i, j

Following are relationships to be added
a <-> b
b <-> d
c <-> f
c <-> i
j <-> e
g <-> j

And given queries like whether a is a friend of d or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant