Leetcode Solutions Java Python C++
All contents and pictures on this website come from the Internet and are updated regularly every week. They are for personal study and research only, and should not be used for commercial purposes. Thank you for your cooperation.
Welcome to Subscribe On Youtube:

5. Longest Palindromic Substring

Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.

Example 1:

Input: "babad"
Output: "bab"
Note: "aba" is also a valid answer.

Example 2:

Input: "cbbd"
Output: "bb"

Difficulty:

Medium

Lock:

Normal

Company:

Adobe Airbnb Alibaba Amazon Apple Baidu Bloomberg Cisco eBay Facebook GoDaddy Google Huawei caMorgan Mathworks Microsoft Oracle Pure Storage Roblox Samsung SAP ServiceNow Tencent Uber VMware Walmart Labs Wayfair Yahoo Yandex

Problem Solution

5-Longest-Palindromic-Substring

All Problems:

Link to All Problems
All contents and pictures on this website come from the Internet and are updated regularly every week. They are for personal study and research only, and should not be used for commercial purposes. Thank you for your cooperation.