LeetCode 19 // Remove Nth Node From End of List in Python



?Description
Hello everyone! “LeetCode in Python” is a series where I explain all solutions to popular LeetCode problems. Each video contains a theoretical section (where I explain the reasoning behind the most optimal solution) and a practical section (where I go over the Python solution). Solving these LeetCode problems has helped me land interviews and job offers from numerous companies like Amazon (SWE offer), Goldman Sachs (SWE offer), and Google (onsite). Stay tuned to learn how to…

Related Posts

4 Comments

  1. We also can keep track of node that has N offset back from current pointer. So once we get to the end of the list, we already will have pointer to node that we want to remove. It require one additional operation per iteration, but can potentially save a lot of iterations, since we don’t need to iterate to remove node for second time

Leave a Reply

Your email address will not be published.

© 2022 Code As Pro - Theme by WPEnjoy · Powered by WordPress