If $x_{1}, \ldots, x_{n}$ are distinct numbers, find a polynomial function $f_{i}$ of degree $n-1$ which is 1 at $x_{i}$ and 0 at $x_{j}$ for $j \neq i .$
I have $$\frac{\prod_{\substack{j = 1 \\ j \neq i}}^{n } (x - x_j)}{\prod_{\substack{k=1 \\ k \neq i}}^{n} (x_i - x_k)}$$