Use of sorting in counterexamples for equations
You want to find solutions to $u^6 + v^6 + w^6 = z^6 - x^6 - y^6$. Obviously any solution would also have to be a solution modulo k, for every k. So the idea is to find the set of all possible values of $u^6 + v^6 + w^6$ modulo W, and the set of all possible values of $z^6 - x^6 - y^6$, and you need to find the elements that are common to both sets.

Question: What is the easiest way to check which elements two sets have in common? Answer: Sort the elements, that makes the search very easy. 

The further steps: If you are lucky then both sets had few elements in common. So you can deduce values of u, v, w, x, y, z modulo W or modulo some other value. Which means you have reduced the search space. If there was a good amount of reduction, try different values instead of W. And at some point you start with an exhaustive search, but with fewer values needing to be searched.