Deloitte OA Question 2024 June | Strings & DP | on-campus
Deloitte · Question · Posted Jun 2026
Question: Palindromic Substrings Problem Statement Given a string s, return the number of palindromic substrings in it. A string is a palindrome when it reads the same backward as forward. A substring is a contiguous sequence of characters within the string. Constraints 1 <= s.length <= 1000 s consists of lowercase English letters. Examples Example 1: Input: s = "abc" Output: 3 Explanation 1: The 3 palindromic substrings are "a", "b", and "c". Each single character is trivially a palindrome. ...
The full answer & interview discussion are available to premium members.
Log in Create a free account