I have been preparing for my exam tomorrow and I just can't think of a function that is onto but not one-to-one.
I know an absolute function isn't one-to-one or onto. And an example of a one-to-one function that isn't onto is $f(n)=2n$ where $f:\mathbb{Z}\to\mathbb{Z}$.
Help?