EXL Service interview question

Ant in triangular box puzzle