  We use quantum walks to construct a new quantum algorithm for element
distinctness and its generalization. For element distinctness (the problem of
finding two equal items among N given items), we get an O(N^{2/3}) query
quantum algorithm. This improves the previous O(N^{3/4}) query quantum
algorithm of Buhrman et.al. (quant-ph/0007016) and matches the lower bound by
Shi (quant-ph/0112086). The algorithm also solves the generalization of element
distinctness in which we have to find k equal items among N items. For this
problem, we get an O(N^{k/(k+1)}) query quantum algorithm.
