Reads The Same Both Ways
A medium Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L5
Interview Prompt
Auditing free-text fields in a data export, you need the longest contiguous stretch of a string `s` that reads the same forwards and backwards. If several stretches tie for that maximum length, return the one with the smallest starting index.
Summary
Somewhere in the noise, a stretch that mirrors itself. Find the longest one.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision