Solution (source code)

= Solution

For a wire of length $L$, one spin state has $L\,dk/(2\pi)$ states in one propagation direction. Including two degenerate spin states and using $d\epsilon/dk=\hbar v$ gives
$$
\boxed{g_+(\epsilon)=\frac{2L}{h|v|},\qquad g_{\rm both}(\epsilon)=\frac{4L}{h|v|}.}
$$
Divide by $L$ for density per unit length. The factor-of-two distinction is essential: the current from one reservoir uses only its incoming propagation branch. If <spin degeneracy> is lifted, count each resolved spin channel separately.