Category having an arrow which is both epi and monic but not invertible 
Find a Category having an arrow which is both epi and monic but not invertible (eg., dense subset of a topological space)
Categories for Working Mathematician Pg-21

Relevant Definitions
Epi Arrow: An arrow $h: a \to b$ is said to be epic if for arrows $g_1,g_2: b \to c$ , $g_1 \circ h = g_2 \circ h \implies g_1 = g_2$
Mono: An arrow $m: a \to b$  is said to be mono if for arrows $f_1, f_2 : d \to a$ , $m \circ f_1 = m \circ f_2 \implies f_1 = f_2$
An arrow $ e:a \to b$ is invertible in $C$ if there is an arrow $e': b \to a$ in $C$ with $e' e = 1_a$ and $ee'= 1_b$
Dense subsets there are many definitions. I take the definition that $A$ is a dense subset of topological space $X$ if  $ \text{cl} A = X$
My attempt
I am not sure what the idea was behind putting the example of dense subset of topological space in bracket. Maybe that is somehow related to the answer I guess.
I suppose that the trick in solving this question lies in somehow redefining closure in terms of sets and morphisms. However, it is not clear how one would do that. It seems so the alternate definitions provided in Wiki doesn't help much either.
One thing which is clear to me is that non examples for the statement would be category of set and groups.
 A: The simplest example is to take a nontrivial poset, say the poset $0 \le 1$, regarded as a category with a unique arrow $a \to b$ iff $a \le b$. In any such category I invite you to check that every morphism is both epi and mono but the only isos are the equalities.
This example is not particularly enlightening. The hint about dense subsets is a reference to what happens if you consider the category of Hausdorff topological spaces. In this category you can check that 1) a mono is an injective map, but 2) an epi is a map with dense image. So any inclusion of a proper dense subset, say $\mathbb{Q} \hookrightarrow \mathbb{R}$, is an example of a morphism which is both mono and epi but not iso.
To really get a handle on what's going on I think it helps to know the following. There are various statements you can prove of the form that if a map is mono + a stronger version of epi, then it must be iso. Here is a nice one that is usable in practice: an effective epimorphism is a morphism $f : X \to Y$ which is the coequalizer of its kernel pair $X \times_Y X$. This says that $f$ is obtained from $X$ by quotienting by the equivalence relation generated by $f$, and is a nonlinear generalization of "$f$ is the cokernel of its kernel" familiar from abelian categories. Some examples to get a sense of how this definition behaves:

*

*An effective epimorphism in $\text{Set}$ is a surjection.

*An effective epimorphism in $\text{Grp}$ is a surjection. This is a version of the first isomorphism theorem.

*An effective epimorphism in $\text{Top}$ is a surjection $f : X \to Y$ where $Y$ has the quotient topology with respect to the equivalence relation $f(x_1) = f(x_2)$ on $X$.

*An effective epimorphism in $\text{CRing}$ is a surjection. This is again a version of the first isomorphism; note that there are epimorphisms in $\text{CRing}$ which are not surjections, such as localizations.

Now one can prove:

Proposition: A morphism which is both mono and effective epi is iso.


Corollary: If a morphism is mono and epi but not iso, then it cannot be effective epi.

So, in other words, this phenomenon of morphisms being mono and epi but not iso can only happen in categories where there are non-effective epis. In some categories, such as $\text{Set}$ and $\text{Grp}$ (but not $\text{CRing}$), every epi is effective, so in those categories one doesn't see this phenomenon. In these categories with non-effective epis one could argue that epis don't give the expected generalization of "surjections" or "quotient maps" and that effective epis do.
Since $\text{Top}$ is a category with non-effective epis one can construct examples in this category, without needing to pass to Hausdorff spaces: any continuous bijection $f : X \to Y$ which is not a homeomorphism is an example. Said another way, the identity map between two copies of the same set $X$ but equipped with two different topologies, one of which is strictly finer than the other, is an example.
