4 Recognizing Star 20 Points Graph G Star Vertex E Adjacent Every Vertex Neighbour Every V Q43815362

in python or java
4 Recognizing a star (20 points) A graph G is a star if it has a vertex e adjacent to every other vertex and is the only neighbour of every other vertex. Given the adjaceney matrix of a graph G, design an O(nº) algorithms that prints YES if G is a star and NO otherwise. Show transcribed image text 4 Recognizing a star (20 points) A graph G is a star if it has a vertex e adjacent to every other vertex and is the only neighbour of every other vertex. Given the adjaceney matrix of a graph G, design an O(nº) algorithms that prints YES if G is a star and NO otherwise.
Expert Answer
Answer to 4 Recognizing a star (20 points) A graph G is a star if it has a vertex e adjacent to every other vertex and is the only…
OR