VinFast Interview Question

DP for path total calculation