Rakuten Interview Question

Write a function that finds the MST of a directed graph.