Probability tree algorithm for general diffusion processes