Sign In
You are coding as a Guest. Sign in with your RoleNest account to permanently track your streak, earn XP, and climb the Campus Leaderboard!
Sign In with RoleNest
🔥Longest Palindromic Substring: Dynamic Symmetry ExpansionMedium
DAILY PROBLEM OF THE DAY+50 XP • Daily Streak

Solve today's challenge or tackle one of the 3 Super Hard challenges for +150 XP.

MediumTwo Pointers•Acceptance: 33.9%

Longest Palindromic Substring: Dynamic Symmetry Expansion

Targeted in FAANG & Tech OA:AmazonMicrosoftGoogle
Real-World Engineering Context
Used in genomic palindrome sequence identification, DNA restriction enzyme recognition sites, and reversible pattern compression.
Given a string `s`, return the longest palindromic substring in `s`.

Sample Test Cases

Input: ["babad"]
Expected: "bab"
Input: ["cbbd"]
Expected: "bb"
Input: ["a"]
Expected: "a"

Constraints

  • 1 <= s.length <= 1000
  • s consist of only digits and English letters.
Recruiter Fast-Track ReferralVerified Candidate
Direct pipeline to Google, Amazon, Microsoft, Swiggy, & Uber recruiters
DevScore: 750/1000

Top DevScore profiles bypass resume screening filters. Every verified problem solve writes authentic proof-of-work to your profile and dispatches you directly into employer inboxes on RoleNest.