Let (W,S) be an arbitrary Coxeter system, {\small $y\in S^*$}. We describe an algorithm which will compute, directly from {\small $y$} and the Coxeter matrix of W, the interval from the identity to {\small $y$} in the Bruhat ordering, together with the (partially defined) left and right actions of the generators. This provides us with exactly the data that are needed to compute the Kazhdan-Lusztig polynomials {\small $P_{x,z}$, $x\leq z\leq y$}. The correctness proof of the algorithm is based on a remarkable theorem due to Matthew
Dyer.