DoorDash Interview Question

How would you implement a search screen feature from scratch?(System Design) Then they ask you to actually code your idea, then you go into a debugging round. How would you fix this code? Different levels are breaking, be sure to know about dependency injection and memory location of objects make sure to pay attention to the debugger.