https://github.com/bryanthelai/socialnetworkgraph
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.
https://github.com/bryanthelai/socialnetworkgraph
bfs breadth-first-search graph social social-network social-network-graph socialnetwork
Last synced: 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/bryanthelai/socialnetworkgraph
- Owner: BryanTheLai
- Created: 2023-08-10T06:11:10.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-25T07:37:40.000Z (almost 2 years ago)
- Last Synced: 2023-10-25T08:55:10.237Z (almost 2 years ago)
- Topics: bfs, breadth-first-search, graph, social, social-network, social-network-graph, socialnetwork
- Language: Java
- Homepage:
- Size: 129 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SocialNetworkGraph
## Visualization of the network.
- Copy and Paste code into dreampuf.github.io/GraphvizOnline

## 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.

## 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
```