Monte Carlo simulation of electron transport in degenerate and inhomogeneous semiconductors