Can someone help me with this problem?
Let $D$ be a divisor on an algebraic curve $X$ of genus $g$, such that $\deg D = 2g-2$ and $\dim L(D) = g$. Then $D$ must be a canonical divisor.
By Riemann-Roch, I see that $\dim L(K-D) = 1$ for any canonical divisor $K$, as must certainly be the case. I don't know if this is too helpful.