Zomato SWE Interview Question 2022 July | Dynamic Programming | on-campus
Zomato · Question · Posted Jun 2026
Question 1 Problem Statement Given a string s, return the longest palindromic substring in s. A palindrome is a string that reads the same forward and backward. Constraints 1 <= s.length <= 1000 s consists of only digits and English letters Examples Example 1: Input: s = "babad" Output: "bab" Explanation 1: Both "bab" (indices 0-2) and "aba" (indices 1-3) are valid palindromes of length 3. Either is accepted. Using expand-around-center: center at index 1 ('a') expands to give "bab". ...
The full answer & interview discussion are available to premium members.
Log in Create a free account