Find all anagrams in a string (LeetCode 438) | Sliding window approach with animations

Nikhil Lohia • June 3, 2025
Video Thumbnail
Nikhil Lohia Logo

Nikhil Lohia

View Channel

About

I want to share with you my knowledge, that I have gained all my life. I like to see every task in your day to day life as an interesting problem to solve, and if you can understand the requirements, solving for it can become somewhat intuitive. I try to explore certain aspects of day to day life and how I can make them easier for you. This involves daily hacks, tutorials, innovations, new discoveries, experiences and all the stuff I find amusing. As a software engineer myself, I also believe that good problem solving skills can help you overcome most of the barriers in life. Programming is one of them. If you know how to approach a problem, writing a code for it in any language could be a very typical task. With this channel I aim to focus on the way to solve a problem efficiently rather than just its implementation.

You May Also Like

Essential Coding & Learning Tools

AI-recommended products based on this video

Loading...
65W 45W Laptop Charger for Acer Aspire 3 5 A515-55 A515-56 A515-46 A515-54 A515-54G A517-52 Swift Spin 1 3 5 SF113-31 SF114-32 Chromebook 11 R11 13 14 15 CB3 C720 C720P Power Adapter

65W 45W Laptop Charger for Acer Aspire 3 5 A515-55 A515-56 A515-46 A515-54 A515-54G A517-52 Swift Spin 1 3 5 SF113-31 SF114-32 Chromebook 11 R11 13 14 15 CB3 C720 C720P Power Adapter

(64)
$19.98
FREE delivery Sun, Jun 15 on your first order
Loading...
Laptop AC Charger for Acer Aspire 5 A515 A515-56 A515-56T A515-55 A515-54 A515-46 A515-45 A515-44 A514-52G A515-57 A514-54 Laptop

Laptop AC Charger for Acer Aspire 5 A515 A515-56 A515-56T A515-55 A515-54 A515-46 A515-45 A515-44 A514-52G A515-57 A514-54 Laptop

(5)
$25.99
FREE delivery Sun, Jun 15 on your first order
Loading...
45W Charger for Acer Aspire 5 A515-55 A515-54 A515-56 A515-56T A515-57 A514-52G A514-54 A515-46 A515-44 A515-45 Laptop Power Supply Adapter

45W Charger for Acer Aspire 5 A515-55 A515-54 A515-56 A515-56T A515-57 A514-52G A514-54 A515-46 A515-44 A515-45 Laptop Power Supply Adapter

(2)
$20.90
FREE delivery Sun, Jun 15 on your first order
Loading...
65W AC Charger Fit for Acer Aspire 5 1 Series A515 A515-53 A515-53G A515-52 A515-52G A515-52K A515-51 A515-51G A515-41G A515-43 A515-43G A517-51 A517-51G A114-31 A114-32 A111-31 A111-32 Laptop

65W AC Charger Fit for Acer Aspire 5 1 Series A515 A515-53 A515-53G A515-52 A515-52G A515-52K A515-51 A515-51G A515-41G A515-43 A515-43G A517-51 A517-51G A114-31 A114-32 A111-31 A111-32 Laptop

(12)
$23.99
FREE delivery Sun, Jun 15 on your first order
Loading...
Anker 332 USB-C Hub (5-in-1) with 4K HDMI Display, 5Gbps - and 2 5Gbps USB-A Data Ports and for MacBook Pro, MacBook Air, Dell XPS, Lenovo Thinkpad, HP Laptops and More

Anker 332 USB-C Hub (5-in-1) with 4K HDMI Display, 5Gbps - and 2 5Gbps USB-A Data Ports and for MacBook Pro, MacBook Air, Dell XPS, Lenovo Thinkpad, HP Laptops and More

(11,639)
$23.99
FREE delivery Sat, Jun 14 on your first order
1K+ bought in past month
Loading...
Logitech M185 Wireless Mouse, 2.4GHz with USB Mini Receiver, 12-Month Battery Life, 1000 DPI Optical Tracking, Ambidextrous, Compatible with PC, Mac, Laptop - Black

Logitech M185 Wireless Mouse, 2.4GHz with USB Mini Receiver, 12-Month Battery Life, 1000 DPI Optical Tracking, Ambidextrous, Compatible with PC, Mac, Laptop - Black

(43,809)
$14.99$11.99
FREE delivery Mon, Sep 22 on your first order
1K+ bought in past month
Loading...
Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black
Best Seller

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black

(17,871)
$27.98$22.38
FREE delivery Tue, Oct 14 on your first order
500+ bought in past month
Loading...
Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

(21,223)
$44.98
FREE delivery Tue, Oct 14
1K+ bought in past month
Loading...
Logitech G502 HERO High Performance Wired Gaming Mouse, HERO 25K Sensor, 25,600 DPI, RGB, Adjustable Weights, 11 Programmable Buttons, On-Board Memory, PC / Mac, Black
Best Seller

Logitech G502 HERO High Performance Wired Gaming Mouse, HERO 25K Sensor, 25,600 DPI, RGB, Adjustable Weights, 11 Programmable Buttons, On-Board Memory, PC / Mac, Black

(54,445)
$49.98$44.98
FREE delivery Tue, Oct 14
1K+ bought in past month
Loading...
Seventable L Shaped Computer Desk with Drawers 47.2 inch,Gaming Desk with Power Outlets & LED Lights,Reversible Office Desk with Storage Shelves,Corner Desk with Monitor Stand for Home Office White

Seventable L Shaped Computer Desk with Drawers 47.2 inch,Gaming Desk with Power Outlets & LED Lights,Reversible Office Desk with Storage Shelves,Corner Desk with Monitor Stand for Home Office White

(597)
$129.99
FREE delivery Thu, Jun 26
50+ bought in past month
Loading...
Seventable L Shaped Computer Desk with Power Outlets & LED Lights, 44.6"Small Home Office Desk with 3 Fabric Drawers, Reversible Gaming Desk with Storage Shelves, Corner Desk with Monitor Stand, White

Seventable L Shaped Computer Desk with Power Outlets & LED Lights, 44.6"Small Home Office Desk with 3 Fabric Drawers, Reversible Gaming Desk with Storage Shelves, Corner Desk with Monitor Stand, White

(100)
$119.99
FREE delivery Thu, Jun 26
Loading...
ODK Gaming Desk with Led Lights & Power Outlet, 48 Inch Gaming Computer Desk with Storage Shelves, PC Desk with Monitor Stand, Gamer Desk Table for Home Office, Black

ODK Gaming Desk with Led Lights & Power Outlet, 48 Inch Gaming Computer Desk with Storage Shelves, PC Desk with Monitor Stand, Gamer Desk Table for Home Office, Black

(1,001)
$129.99
50+ bought in past month
Loading...
Rolanstar Computer Desk L Shaped 56.7" with LED Lights & Power Outlets, Reversible L Shaped Gaming Desk with Monitor Stand, Office Desk with Storage, Writing Desk with USB Port & Hook, Black

Rolanstar Computer Desk L Shaped 56.7" with LED Lights & Power Outlets, Reversible L Shaped Gaming Desk with Monitor Stand, Office Desk with Storage, Writing Desk with USB Port & Hook, Black

(3,191)
$179.99
FREE delivery Thu, Jun 26
50+ bought in past month
Loading...
Dell 24 Monitor - SE2425HM - 23.8-inch Full HD (1920x1080) 16:9 100Hz Display, IPS Panel, 16.70 Million Colors, Anti-Glare, 1 HDMI / 1 VGA Port, TÜV Rheinland 3-Star*, Comfortview Plus - Black

Dell 24 Monitor - SE2425HM - 23.8-inch Full HD (1920x1080) 16:9 100Hz Display, IPS Panel, 16.70 Million Colors, Anti-Glare, 1 HDMI / 1 VGA Port, TÜV Rheinland 3-Star*, Comfortview Plus - Black

(169)
$119.99$103.99
FREE delivery Tue, Oct 7
300+ bought in past month
Loading...
Dell S2425HS Monitor - 23.8 Inch, FHD (1920x1080) Display, 100Hz Refresh Rate 1500:1 Contrast Ratio, TÜV Rheinland Eye Comfort 4 Star, Integrated 2x5W Speaker, Height/Tilt/Swivel/Pivot - Ash White

Dell S2425HS Monitor - 23.8 Inch, FHD (1920x1080) Display, 100Hz Refresh Rate 1500:1 Contrast Ratio, TÜV Rheinland Eye Comfort 4 Star, Integrated 2x5W Speaker, Height/Tilt/Swivel/Pivot - Ash White

(15)
$139.99
FREE delivery Tue, Oct 7
300+ bought in past month
Loading...
USB C Docking Station Dual Monitor for Dell Hp,15-in-1 Laptop Docking Station 3 Monitors USB C Hub with Dual 4K HDMI,8K DP,Button,PD Charging,Ethernet,6 USB A&C,SD/TF, Audio USB-C Multiport Adapter

USB C Docking Station Dual Monitor for Dell Hp,15-in-1 Laptop Docking Station 3 Monitors USB C Hub with Dual 4K HDMI,8K DP,Button,PD Charging,Ethernet,6 USB A&C,SD/TF, Audio USB-C Multiport Adapter

(1,359)
$67.98
FREE delivery Sun, Aug 24
100+ bought in past month
Loading...
Dell 24 Monitor - P2425H EPEAT

Dell 24 Monitor - P2425H EPEAT

(57)
$239.99$189.05
FREE delivery Tue, Oct 7
50+ bought in past month
Loading...
Bose QuietComfort Wireless Noise Cancelling Headphones, Bluetooth Over Ear Headphones with Up to 24 Hours of Battery Life, Moonlight Grey - Limited Edition

Bose QuietComfort Wireless Noise Cancelling Headphones, Bluetooth Over Ear Headphones with Up to 24 Hours of Battery Life, Moonlight Grey - Limited Edition

(12,251)
$269.00
FREE delivery Tue, Oct 14
Loading...
Amazon Basics Clear Thermal Laminating Plastic Paper Laminator Sheets, 9 x 11.5-Inch, 200-Pack, 3mil

Amazon Basics Clear Thermal Laminating Plastic Paper Laminator Sheets, 9 x 11.5-Inch, 200-Pack, 3mil

(87,803)
$25.99$19.49
FREE delivery Mon, Sep 15 on your first order
10K+ bought in past month
Loading...
Amazon Basics 9 Volt Everyday Alkaline Battery - Pack of 8 The Nordic Swan Ecolabel

Amazon Basics 9 Volt Everyday Alkaline Battery - Pack of 8 The Nordic Swan Ecolabel

(215,650)
$12.78
FREE delivery Wed, Aug 20 on your first order
4K+ bought in past month
Loading...
Amazon Basics 48 Pack AA High-Performance Alkaline Batteries, 10-Year Shelf Life, Easy to Open Value Pack The Nordic Swan Ecolabel

Amazon Basics 48 Pack AA High-Performance Alkaline Batteries, 10-Year Shelf Life, Easy to Open Value Pack The Nordic Swan Ecolabel

(568,836)
$18.26
FREE delivery Wed, Aug 20 on your first order
10K+ bought in past month
Loading...
Amazon Basics 64GB microSDXC Memory Card with Full Size Adapter, 100MB/s, U3, 2-Pack

Amazon Basics 64GB microSDXC Memory Card with Full Size Adapter, 100MB/s, U3, 2-Pack

(18,727)
$21.99$20.39
FREE delivery Sun, Aug 10 on your first order
500+ bought in past month