northwest corner algorithm min cost  calculator