State-efficient QFA Algorithm for Quantum Computers