Minimum Spanning Tree

Does the source vertex from where we have to start make a difference in prim/kruskal??
i was implementing the code for hackerrank for prim
it worked…but they were also giving the input for the source vertex(link)
also does applying only path compression in disjoint set without the rank heurestics make a difference??because after path compression anyways the height wont go above 2 for the tree?