White RoomNEW White Room DSA

Ant On A Cube

An ant starts at one corner of a cube and walks to a neighbouring corner every second, choosing among the three edges at its current corner with probability 1/3 each.

starttarget

On average, how many seconds pass before it first reaches the corner diagonally opposite its start?

Answer format: enter an integer.