Describe a turing machine that accepts Language L = {www| w is {a,b}*}
Let $\ell$ be the length of the input.
You can assume w.l.o.g. that $\ell=3k$ for some integer $k$. If this is not the case (which can be easily checked by your TM), then the answer is trivial.
The problem boils down to finding $k$. In order to do so you can use the following strategy:

&quot;mark&quot; the two rightmost unmarked tape cells;
&quot;mark&quot; the leftmost unmarked cell;
If the cell immediately to the right of the current head position is marked, then you are done since the head must be in position $k$. Otherwise, repeat from step 1.