#3083

Existence of a Substring in a String and Its Reverse

pupil · 325 · lc easy +22 · 66.4% accepted · 111 likes · top 72%

Description

Given a string s, determine if any two-character substring of s also appears in the reversed version of s. Return true if such a substring exists, false otherwise.

Code

1
2
3