Leetcode 214 Shortest Palindrome using KMP and Z Algorithms | String Matching Practice Problems
As we have covered Z and KMP Algorithms in the past videos, now we plan to solve some problems on these algorithms!
This problem is a rather famous problem on String Matching which can be solved both via KMP and Z Algorithm: leetcode.com/problems/shortes...
Connect with me on Linkedin: / bharat-khanna-717b4817b
Connect on Insta: / bharatkhanna1995
00:00-02:33 Introduction to Problem
02:34-04:21 Worst Case
04:22-08:07 Shifting of centre
08:08-11:55 Largest Palindromic Prefix idea
11:56-14:19 Brute Force O(N^2)
14:20-19:24 Using KMP for O(N)
19:25-21:14 Alternate using Z Algo
21:15-23:27 Code using KMP
23:28-26:09 Code using Z
Пікірлер: 8
Great explanation, keep it up
nice video bro
Thanks ❤
Great Explanation !
@CodingwithBharat
4 ай бұрын
Thanks ✌️
Please make video on leetcode weekly contest qn.no.4
@CodingwithBharat
4 ай бұрын
Can you give the link? Will include it in next one
N*n