I have the database movies (movie_id INT, actor VARCHAR(80)) and i want to answer to this question
’Six degrees of separation’: Given two actor names, determine their ’degree of separation’, defined as 1 follows: Two actors ’A’ and ’B’ are 1-degree away if they played in at least one movie together; they are 2-degrees away if there exists an actor ’C’ who is 1-degree away from each of ’A’ and ’B’; and so on.
Do you have any idea how i can do this ?
Thank you

Recommended Answers

All 3 Replies

This is rather annoying. I believe that a forum like this one are meant to help people share their knowledge and help each other, in real questions, and not high school (or elementary) exercises.

If this is an elementary exercise, what is the solution? And why do you mind helping them with their homework if you don't mind helping them with their work?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.