Maximum Cost Spanning Tree Algorithm Code Examples