diff --git a/nik_prims_algo.md b/nik_prims_algo.md new file mode 100644 index 0000000..48faad3 --- /dev/null +++ b/nik_prims_algo.md @@ -0,0 +1,32 @@ +## Thanks for contributing +Please fill the below information
+* Name of the algorithm: Prim's Algorithm +* Data structures used : Graphs + +### PRIM'S ALGORITHM + +I found Prim's Algorithm to be most intriguing because it was the first algorithm which was taught to me in DSA. + +It is used to find Maximum Spanning Tree and the shortest distance from the starting vertex. + +It uses Priority Queues to find MST. + +In it, starting vertex is given to us to find MST. + +Lastly, it has only one subtree and in iteration, a vertex and an edge is added to it. + + + +Time complexity: O((V+E)(log V)) + +V:Vertex of Graph +E:Edge of Graph + +Data Structure used: Graphs + + + + + + - Nishchay Gupta +