Minimum Spanning Tree for directed graph with zero cycles