Quantum walks with memory for algorithmic applications