Longest Palindromic Substring O(N) Manacher's Algorithm | Leetcode - 5
Algorithms Made Easy
View ChannelAbout
This channel is run by Rajat (Staff @Bitgo) and Khushbu (Technical Lead @Arcesium). We have lot of experience in cracking the interviews of top companies and we want to share the same with you !! This channel is dedicated to solving complex coding problems and then optimizing code as we move forward. Every video is targeted to the solution of one problem and has solutions right from every naive or brute force to the most optimized and popular solutions. This channel will help you to understand Data structures and algorithms in much better and simpler ways. To support us you can donate UPI: algorithmsmadeeasy@icici All the code links are placed at the link: https://github.com/Algorithms-Made-Easy Go through the code and if you face any issue you an always come back and comment. Happy to help you!! Subscribe to the channel and press the bell icon for more updates.
Latest Posts
Video Description
Part 1: https://www.youtube.com/watch?v=QfZvw8_jz1w Given a string, find the longest palindromic substring in this string in linear time. To support us you can donate UPI: algorithmsmadeeasy@icici Check out our other popular playlists: ✅✅✅[ Tree Data Structure ] : https://www.youtube.com/playlist?list=PLJtzaiEpVo2zx-rCqLMmcFEpZw1UpGWls ✅✅✅[ Graphs Data Structure ] : https://www.youtube.com/playlist?list=PLJtzaiEpVo2xg89cZzZCHqX03a1Vb6w7C ✅✅✅[ December Leetcoding Challenge ] : https://www.youtube.com/playlist?list=PLJtzaiEpVo2xo8OdPZxrpybGR8FmzZpCA ✅✅✅[ November Leetcoding Challenge ] : https://www.youtube.com/playlist?list=PLJtzaiEpVo2yMYz5RPH6pfB0wNnwWsK7e ✅✅✅[ August Leetcoding Challenges ] : https://www.youtube.com/playlist?list=PLJtzaiEpVo2xu4h0gYQzvOMboclK_pZMe ✅✅✅[ July Leetcoding Challenges ] : https://www.youtube.com/playlist?list=PLJtzaiEpVo2wrUwkvexbC-vbUqVIy7qC- ✅✅✅[ Cracking the Coding Interview - Unique String ] : https://www.youtube.com/playlist?list=PLJtzaiEpVo2xXf4LZb3y_BopOnLC1L4mE ✅✅✅[ June Leetcoding Challenges ] : https://www.youtube.com/playlist?list=PLJtzaiEpVo2xIfpptnCvUtKrUcod2zAKG ✅✅✅[ May Leetcoding challenges ]: https://www.youtube.com/playlist?list=PLJtzaiEpVo2wRmUCq96zsUwOVD6p66K9e Problem Link: https://leetcode.com/problems/longest-palindromic-substring Code: https://github.com/Algorithms-Made-Easy/January-Leetcoding-Challenge-2021/blob/main/19.%20Longest%20Palindromic%20Substring-Manacher's%20Algorithm If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful. #coding #leetcode #programminglife #programmingisfun #programmer #tech #software #codinglife #leetcode
iPhone 13 Upgrade Essentials
AI-recommended products based on this video

for Magsafe Car Mount【20 Strong Magnets 】Magnetic Phone Holder for Car Phone Holder Mount Dash【360°】Cell Phone Mount for Car Accessories,Car Mount for iPhone 16 Pro Max 15 14 13 12 Plus MagSafe Cases

2Pack 10ft iPhone Charger 90 Degree Lightning Cable Right Angle Long USB Charging Cord Compatible with Apple iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad iPod

Magnetic Wireless Charger for iPhone: Fodable 3 in 1 Charging Station for Multiple Apple Devices - Travel Charging Pad Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus & Airpod Global Recycled Standard

Magnetic Wireless Charger for iPhone - 3 in 1 Mag-Safe Charging Station for Multiple Devices Apple - Charger Stand Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus Airpods
![iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods](https://m.media-amazon.com/images/I/71xZOlUELbL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods

2 Pack Magnetic Wireless Charger 15W Fast Mag-Safe Charger Stand Compatible with iPhone 16/15/14/13/12 Series Wireless Charging Pad for AirPods 3/2/Pro 2/Pro White Portable Mag Safe Kickstand

Magnetic Wireless Charger for iPhone: Fodable 3 in 1 Charging Station for Multiple Apple Devices - Travel Charging Pad Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus & Airpod Global Recycled Standard

Wireless Earbuds, 2025 Bluetooth 5.4 Bass Stereo Headphones with 4 ENC Mic, 48H Playback Ear Buds with Charging Case LED Display,Sport Earphones IPX7 Waterproof for Phone, Android, Pad, White

Anker USB C Charger Cable (6ft 100W, 2Pack), USB 2.0 Type C Fast Charging Cable for iPhone 15 / 15Pro / 15Plus / 15ProMax MacBook Pro 2020, iPad Pro 2020, iPad Air 4, Samsung Galaxy S23+/S23 Ultra ClimatePartner certified
![Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)](https://m.media-amazon.com/images/I/71N7xhCJnoL._AC_UL960_FMwebp_QL65_.jpg)
Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)

Magnetic Wireless Charger for iPhone - 3 in 1 Mag-Safe Charging Station for Multiple Devices Apple - Charger Stand Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus Airpods

4-in-1 Wireless Magnetic Power Bank 10800mAh Portable Charger with iWatch Charger, QC4.0+20W PD Fast Charging USB C Battery Pack for Magsafe, iPhone 16/15/14/13/12 Series, Apple Watch etc. (White)

eazpower for Magsafe Power Bank 10000mAh, Magnetic Battery Pack Wireless, 20W PD Fast Charging, Compact Portable Charger with Built-in Cables and Stand for iPhone 16/15/14/13/12/ Apple Watch/Airpods
![Spigen Case for iPhone 17 Case, Ultra Hybrid MagFit [Anti-Yellowing, Magsafe Compatible] Designed for Apple iPhone 17 Case (2025) - Clear White ClimatePartner certified](https://m.media-amazon.com/images/I/61gT1WljYwL._AC_UL960_FMwebp_QL65_.jpg)
Spigen Case for iPhone 17 Case, Ultra Hybrid MagFit [Anti-Yellowing, Magsafe Compatible] Designed for Apple iPhone 17 Case (2025) - Clear White ClimatePartner certified

OHLPRO Tablet Holder for Car, iPad Holder for Car Air Vent Mount, Universal Dashboard Windshield 2-in-1 Cradle TPU Suction Sticky Gel for iPad/iPad mini Samsung Galaxy Size 6"- 10.5" iPad Car Holder

Magnetic Car Mount Air Vent Cell Phone Holder, Universal Vehicle Dash Dashboard Ac Airvent Cellphone Magic Stand with Clip Hook, for iPhone 16 15 Samsung Lenovo Google etc

AINOPE Phone Holder for Car Vent 2025 Gravity Air Vent Car Phone Holder Mount for iPhone 16 Pro Max with Vent Clip Hand Free Cell Phone Car Mount for iPhone 16 Plus Samsung S25 Ultra Car Accesorries
![Miracase Car Phone Mount, [2025 Upgraded Strong Military Grade Suction Cup] Long Arm Phone Holder for Car Dashboard Windshield Vent, Hands Free Cell Phone Holder Compatible with All Mobile Phones Global Recycled Standard](https://m.media-amazon.com/images/I/81oehGW5OLL._AC_UL960_FMwebp_QL65_.jpg)
Miracase Car Phone Mount, [2025 Upgraded Strong Military Grade Suction Cup] Long Arm Phone Holder for Car Dashboard Windshield Vent, Hands Free Cell Phone Holder Compatible with All Mobile Phones Global Recycled Standard
![Spigen Spigen Tempered Glass Screen Protector [GlasTR EZ FIT] designed for Nintendo Switch 2 (2025) - 2 Pack](https://m.media-amazon.com/images/I/61L0hIGSbYL._AC_UL1500_FMwebp_QL65_.jpg)
Spigen Spigen Tempered Glass Screen Protector [GlasTR EZ FIT] designed for Nintendo Switch 2 (2025) - 2 Pack

soundcore by Anker P20i True Wireless Earbuds, 10mm Drivers with Big Bass, Bluetooth 5.3, 30H Long Playtime, IPX5 Water-Resistant, 2 Mics for AI Clear Calls, 22 Preset EQs, Customization via App

soundcore by Anker Q20i Hybrid Active Noise Cancelling Headphones, Wireless Over-Ear Bluetooth, 40H Long ANC Playtime, Hi-Res Audio, Big Bass, Customize via an App, Transparency Mode, Ideal for Travel

soundcore by Anker Q20i Hybrid Active Noise Cancelling Headphones, Wireless Over-Ear Bluetooth, 40H Long ANC Playtime, Hi-Res Audio, Big Bass, Customize via an App, Transparency Mode, Ideal for Travel

soundcore by Anker Q20i Hybrid Active Noise Cancelling Headphones, Wireless Over-Ear Bluetooth, 40H Long ANC Playtime, Hi-Res Audio, Big Bass, Customize via an App, Transparency Mode, Ideal for Travel

Sony WH-CH720N Noise Cancelling Wireless Headphones Bluetooth Over The Ear Headset with Microphone and Alexa Voice Control, Black
![VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung](https://m.media-amazon.com/images/I/71bHSP1cRkL._AC_UL960_FMwebp_QL65_.jpg)
VANMASS [85+LBS Strongest Suction & Clip] 2025 Upgrade Car Phone Holder [Patent & Safety Certs] Cell Phone Mount Truck Stand for Dashboard Windshield Vent for iPhone 16 Pro Max 15 14 13 12 Samsung
![iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad](https://m.media-amazon.com/images/I/517jTqwo1nL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad
![iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods](https://m.media-amazon.com/images/I/71xZOlUELbL._AC_UL960_FMwebp_QL65_.jpg)
iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods

2Pack 10ft iPhone Charger 90 Degree Lightning Cable Right Angle Long USB Charging Cord Compatible with Apple iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad iPod

SanDisk Ultra Dual Drive Luxe USB 3.1 Type-C 32GB Flash Drive for Acer Convertible 2-in-1 Laptops Aspire 1, Chromebook Spin 713 (SDDDC4-032G-G46) Gen1 Bundle with (1) Everything But Stromboli Lanyard

SanDisk 32GB Ultra Dual Drive Luxe USB Type-C - SDDDC4-032G-GAM46

SanDisk 64GB 2-Pack Ultra USB 3.0 Flash Drive (2x64GB) - SDCZ48-064G-GAM462, Black




