Tuesday, May 9, 2017

Bipartite graph small talk

Introduction


It is so enjoyable to learn a new algorithm every day. Also, it is also a good practice to write a small algorithm to solve a problem everyday.

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.

Actionable Item



Read the moderator Aashish Barnwal of the geeksforgeeks.com

Read "How is it to be interviewed at Microsoft?" on quora. Link is here.

Geeks article about interview, link is here

No comments:

Post a Comment