Using any statement instead of length test in algorithm