Longest Palindromic Substring - Leetcode 5 - C#

preview_player
Показать описание

leetcode 5
#Coding #Programming #CodingInterview #leetcode #SlidingWindow #Blind75 #DynamicProgramming

Given a string s, return the longest palindromic substring in s.

Example 1:

Input: s = "babad"
Output: "bab"
Explanation: "aba" is also a valid answer.

Example 2:

Input: s = "cbbd"
Output: "bb"

▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬

00:00 - Problem Description
02:15 - Bruteforce solution
04:34 - How to check if a substring is a palindrome
05:26 - Sliding Window solution
09:04 - C# code for sliding window solution
13:31 - Dynamic Programming solution
28:16 - How to traverse the matrix diagonally
33:40 - C# code for dynamic programming solution
Рекомендации по теме
join shbcf.ru