Text this: Quantum algorithms for path and cycle containment problems