Dsa
Two Pointers
Easy
Symmetric Sublist
Given a list of integers, determine if there exists a contiguous sublist that is symmetric (reads the same forwards and backwards). Write a function that identifies the length of the longest symmetric sublist.
Input Format:
- A single line containing space-separated integers.
Output Format:
- An integer representing the length of the longest symmetric sublist.
Example:
Input:
2 3 4 3 2 1 1 2 3 4 3 2
Output:
6
Key concepts
two_pointersarraysublist
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now