Dinithi
Dinithi

Reputation: 562

What is represent by edges when facebook using graph data structure

when learning graph data structure I learned that facebook also use it.And I know nodes represent persons. is edge represent connections between them? when we become a friend with them is there a edge between me and that new friend?

Upvotes: 1

Views: 110

Answers (2)

George Bobby
George Bobby

Reputation: 1

People are nodes/vertices. The edges show the connection between them. When person A becomes friend with person B, an edge is established between two of them. There is no chance of multiple edges between same two vertices.

Refer this article for more information.

Upvotes: 0

Dinithi
Dinithi

Reputation: 562

yes. new connection established and to show connections those social networks use breadth first search(BFS)

Upvotes: 1

Related Questions