Live Batches
Masterclasses
Menu
Free Courses
Account
Login / Sign Up
Problem Submissions Solution

Longest Palindromic Substring

Difficulty: Medium

Acceptance: 34.80%

Points: 30.00

Given a string **S**, identify the longest palindromic substring within **S**. A palindromic substring is defined as a sequence of characters within **S** that reads the same forwards and backwards. For example, "racecar" and "level" are palindromic substrings.

Topics

Companies

Articles

Examples:

Expected Time Complexity: O(n^2)

Expected Space Complexity: O(1)

Constraints:
  • 1 <= |S| <= 10^4
Companies:
Amazon Microsoft Samsung Visa Walmart + 2 more
Topics:
String
Locked Content
Access Restricted: Please Login to access the code editor and test cases.