Loading...

Palindrome Hunt

A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
medium
Seniority
senior

Problem

Our data quality pipeline flags identifier strings with symmetrical patterns that often indicate copy-paste errors. Write a function called longest_palindrome that returns the longest palindromic substring. If there are ties, return the one starting earliest.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.