Skip to content

A simple unweighted undirected social network graph. It allows users to add and remove nodes and edges, view the social network of a person, and visualize the social network using Graphviz.

Notifications You must be signed in to change notification settings

BryanTheLai/SocialNetworkGraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SocialNetworkGraph

Visualization of the network.

  • Copy and Paste code into dreampuf.github.io/GraphvizOnline

alt text

Steps

Steps to run the project:

  1. Run Driver.java and SocialNetwork.java.
  2. Done

Breath First Search to find path of Jack and Oliver.

alt text

Pseudocode

BFS(graph, startNode):
   // Create an empty queue and mark startNode as visited
   queue = createEmptyQueue()
   mark startNode as visited
   enqueue startNode into the queue
   while queue is not empty:
       current = dequeue from the queue
       process current node
       // Explore neighbors of the current node
       for each neighbor of current:
           if neighbor is not visited:
               mark neighbor as visited
               enqueue neighbor into the queue

About

A simple unweighted undirected social network graph. It allows users to add and remove nodes and edges, view the social network of a person, and visualize the social network using Graphviz.

Topics

Resources

Stars

Watchers

Forks

Languages