In Time Tec Interview Question

Dp salesman problem of 2d table