Hi,
I am providing a community.
Each member is able to add his own contacts at the community.
For example:
A knows B
A knows F
B knows C
C knows D
I want to find the shortest path between A and D so that I can display
A knows D because he/she knows C and C knows D
Do you have any solutions? I think a recurive function would work, but
in my opinion it would be too slow.
I heard about "Dijkstra" or "AStern". Can these alogs help me with my
problem?
Some facts:
- PHP
- Mysql database
- table "members" with the field "member_id"
- table "contact" with the fields "member_id" , "contact_member _id"
Bye
Mad
I am providing a community.
Each member is able to add his own contacts at the community.
For example:
A knows B
A knows F
B knows C
C knows D
I want to find the shortest path between A and D so that I can display
A knows D because he/she knows C and C knows D
Do you have any solutions? I think a recurive function would work, but
in my opinion it would be too slow.
I heard about "Dijkstra" or "AStern". Can these alogs help me with my
problem?
Some facts:
- PHP
- Mysql database
- table "members" with the field "member_id"
- table "contact" with the fields "member_id" , "contact_member _id"
Bye
Mad
Comment