5. Use $0,1, \cdots, 9$ to form a ten-digit number without repeated digits that is divisible by 11. Find the largest and smallest numbers among them.
(Prompt: Let the ten-digit number be $A=\overline{x_{1} x_{2} \cdots x_{10}}$. Let $x=x_{1}+x_{3}+x_{5}+x_{7}+x_{9}, y=x_{2}+x_{4}+x_{6}+$ $x_{8}+x_{10}$. Then $11 \mid (x-y)$. Since $10 \leqslant x, y \leqslant 25$, therefore, $|x-y|=0,11,22$. Because $x_{1}, x_{2}, \cdots, x_{10}$ is a permutation of $0,1, \cdots, 9$, so, $x_{1}+x_{2}+\cdots+$ $x_{10}=45$, i.e., $x+y=45$. And $x-y$ has the same parity as $x+y$, thus, $x-y$ is odd. Therefore, $x-y= \pm 11$. Solving gives $(x, y)=(28,17)$ or $(17,28)$. Hence, $A_{\text {max }}$ $=9876524130, A_{\min }=1024375869.$)