  In this paper, we determine the maximum size of digraphs on $n$ vertices in
which there are no two distinct walks of length $3$ with the same initial
vertex and the same terminal vertex. The digraphs attaining this maximum size
are also characterized. Combining this with previous results, we obtain a full
solution to a problem proposed by X. Zhan in 2007.
