Mridul-1-Sharma / data_structures_algos

Contribute to this repository with valid pull request to Hacktoberfest 2022 and earn awesome swags & T-shirts. This is a beginner friendly Project.
MIT License
6 stars 27 forks source link

Simple matrix graph #58

Closed JunJul closed 1 year ago

JunJul commented 1 year ago

// We can create either a directed graph or an undirected graph according to the flag // if the flag is false which means undirected; otherwise, it is directed // insert vertex and return its index which will be used for insertEdge // for example if we have A and B two vertices in the array, which are index 0, 1 // so insert the edge in edges[0][1] and edges[1][0] if it is an undirected graph // if it is directed, only need to do edges[0][1]

// add more functions for checking if two vertices are adjacent and getVertex

JunJul commented 1 year ago

@Mridul07Sharma Hi, this is my graph program. Please add me a Hacktoberfest label.