You will get stuck. How you handle it matters more than avoiding it.
Recovery strategies:
Verbalize: "I'm not sure how to handle this case. Let me think about what happens when..."
Simplify: "Let me solve a simpler version first and then extend it."
Ask for hints: "Can you point me in the right direction?" This is acceptable.
Pivot: "My initial approach isn't working. Let me try a different data structure."
Your interviewer expects you to struggle. They're evaluating resilience, not perfection. A candidate who recovers well often outscores one who solves easily but can't explain.