I am well aware that the Cantor function is a counterexample to a function being uniformly continuous but not absolutely continuous.
But just by looking at the definition gets me confused. Here is my wrong proof: please help me find my mistake.
Let $f$ be uniformly continuous, and fix $n$. Then for $\varepsilon>0,\exists \delta>0 (|a-b|<\delta \rightarrow |f(a)-f(b)|< \varepsilon/n)$.
Now let $\sum_k (y_k - x_k) < \delta$.
Then we have $y_j-x_j \leq \sum_k (y_k - x_k) < \delta$, so $| f(y_j)- f(x_j) | < \varepsilon/n.$
Thus for any $n$ pairwise disjoint intervals, $\sum_k | f(y_k) - f(x_k) | < \varepsilon.$
You have not chosen $\delta$ independently of $n$. For more than $n$ intervals the last step goes wrong.