Remove Nth Node from End of List - Leetcode 19 - Linked Lists (Python)

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


Please check my playlists for free DSA problem solutions:

My Favorite Courses:

Data Structures & Algorithms:

Python:

Web Dev / Full Stack:

Cloud Development:

Game Development:

SQL & Data Science:

Machine Learning & AI:
Рекомендации по теме
Комментарии
Автор

Master Data Structures & Algorithms For FREE at AlgoMap.io!

GregHogg
Автор

I solved this problem differently, but I love your solution more! Thanks for the explanation. If you ever read this, could you please make a video for 1721. Swapping Nodes in a Linked List? Thanks a bunch, Greg!

yvettcodes
Автор

made way more sense to me when i though of it as l, r instead of ahead, behind

kubs
Автор

Hello, does the while loop get added as o(m+n). Why not? Worst case scenario it could go n-1 times right if the n value is 1. I do not understand why it is just o(m) here. Thank you

habeebah
Автор

how does changing the behind variable change the summy variable?

mmm-iews