Lifeguards Plat

Problem link: USACO

Since there is no provided solution for this problem, I am referencing this as the solution code.

I don’t understand how “bestTransition” transition works. Can someone tell me what bestTransition[i] represents?