SoundHound Interview Question

General problem on heuristic search