The goal in devising an algorithm for a quantum computer is to **choreograph a pattern of constructive and destructive interference** so that for each wrong answer the contributions to its amplitude cancel each other out, whereas for the right answer the contributions reinforce each other.
If, and only if, you can arrange that, you’ll see the **right answer with a large [[probability]]** when you look.
The tricky part is to do this without knowing the answer in advance, and faster than you could do it with a classical computer.