Let $f:\{1,2,3...,10\}\to \mathbb{Z}$ be a function such that $|f(i)-i|=p,\forall i\in\{1,2,3,...,10\}$. If maximum value of $f(x)$ is $15$ then find
(i) number of possible values of $p$
(ii)number of such functions
(iii)minimum value of $f(x)$
My Attempt
I took $f(i)-i=\pm p$. So $f(i)=i\pm p$ which should mean that $i\pm p\leq 15$ which means $p$ can only take the value $5$. I don't understand how to proceed further