If $f:\mathbb{Z}\to\mathbb{N}$ is defined by $f(n)=\begin{cases}2n, & \text{if } n>0\\ 1, & \text{if } n=0\\ -2n-1, & \text{if } n<0\end{cases}$ then f is
- A
one-one but not onto
- B
onto but not one -one
- C
both one-one and onto
- D
neither one-one nor onto