Get Time
Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings
View: Flat (newest first)  | Threaded  | Tree
Previous Thread  |  Next Thread
Parking Problem | Reply
In the c++ code given for the Parking problem,
what does this statement do:

int ncst = max(cst, cost[next][where]);

The statement is executed while considering a backward edge.
While following a backward edge, are we not canceling a parking allotment? Then what is the need for considering the corresponding cost?