Tap here to switch tabs
Problem
Submissions

Problem: Existence of a Substring in a String and Its Reverse

med
30 min
Try to solve the Existence of a Substring in a String and Its Reverse problem.

Statement

Given a string s, determine if there exists any substring of length 22 that is also present in the reverse of s.

Return true if such a substring exists, or false otherwise.

Constraints:

  • 1≤1 \leq s.length ≤100\leq 100

  • s consists only of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Existence of a Substring in a String and Its Reverse

med
30 min
Try to solve the Existence of a Substring in a String and Its Reverse problem.

Statement

Given a string s, determine if there exists any substring of length 22 that is also present in the reverse of s.

Return true if such a substring exists, or false otherwise.

Constraints:

  • 1≤1 \leq s.length ≤100\leq 100

  • s consists only of lowercase English letters.