Minimum Cost Path with Edge Reversals — CaffeCode