Introduction
Plan to read wiki article bipartite graph first, and then work on a geeksforgeeks algorithm.
The article link is here. And the geeksforgeeks.com article is "check a graph is bipartite".
Bipartite graph
First C# practice code is here. There is a bug on line 55, 56, LinkedList RemoveFirst api should be called, otherwise the while loop will loop forever.
Second C# practice code is here. The test case in Main function is a loop with 4 nodes, so it is bipartite graph. Return true.
Add more test cases later.
Second C# practice code is here. The test case in Main function is a loop with 4 nodes, so it is bipartite graph. Return true.
Add more test cases later.
Actionable Item
Read the moderator Aashish Barnwal of the geeksforgeeks.com
No comments:
Post a Comment