Samsung Electronics interview question

One question on prims algorithm followed by a discussion on my projects