CPKit
v1.6.1

Longest Palindromic Substring

AlgorithmsMedium

Extract the longest palindromic substring, highlighting it inside the text sequence.

Alt+Shift+P

Configuration Panel

Complexity Indices

Time ComplexityO(N^2)
Auxiliary SpaceO(1)
Conceptual Overview

Longest Palindromic Substring (LPS) finds the longest contiguous substring inside string S that reads identically forwards and backwards.

Source: CP-Algorithms reference guide