โ† HSBC questions

Prim's MST for adjacency list representation

Filed under HSBC

Given a connected, undirected, and weighted graph represented as an adjacency list, implement Prim's algorithm to find the Minimum Spanning Tree (MST) and return the total weight of the MST.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related HSBC questions

Collected from public candidate posts and coding forums. Updated Nov 2026.