Consider this example: $(a,b) = (0,1)$ with $x_1= 3/4$, $x_2=1/2$, $c_1 = 1$, and $c_2=2$. Then \begin{equation*} f(x) = \begin{cases} 0, & x \leq \frac{1}{2}\\ 2, & \frac{1}{2} < x \leq \frac{3}{4}\\ 3, & \frac{3}{4} <x \end{cases} \end{equation*}
It seems to me that the order is irrelevant as noted by Rudin.
Note The comment below of krm2233 gives a nice explanation of how this example is constructed from the definition