Kruskal Algorithm of Greedy Algorithm in C/C++/Java/Python

Kruskal Algorithm in Greedy Algorithm in C/C++/Java/Python.It is an Algorithm that is used to generate a minimum spanning tree for a given graph.A Spanning tree is a subset, connected graph G, and all the edges are connected in such a way that we can traverse to any edge from a particular edge with or without intermediates. So, if there are n vertices in a connected graph then the no. of edges that a spanning tree may have is n-1.

Split the Circular Linked List into two halves in C/C++/Java/Python

In the case of an even number of elements in the linked list, we can easily split the list into two halves.Store the mid and last pointers of the circular linked list using the tortoise and hare algorithm. Now, make the second half circular and the first half circular. Set the head (or start ) pointers of the two linked lists.