Actually, I think you wouldn't need the for-loop if you sort the values, since you would know which card has the lowest value. You could just check that card1 equals card2-1, etc.
You could use another way to avoid sorting, though. You could use a loop to check that there are cards all with values n to n+4.
There are an infinite number of ways to solve any problem, so you may be able to come up with another solution.