Determine if the given undirected graph is regular. Graph is called regular, if all its vertices have the same degree. I
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Determine if the given undirected graph is regular. Graph is called regular, if all its vertices have the same degree. I
Determine if the given undirected graph is regular. Graph is called regular, if all its vertices have the same degree. Input First line contains number of vertices n. Next n lines describe adjacency matrix. Output Choose true if graph is regular and false if not regular. Sample input 4 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 Sample output true