11. Leetcode - Remove nth node from end

Publié le: 11 juin 2022
sur la chaîne: Amit Bhave
12
1

Problem: https://leetcode.com/problems/remove-...

Algorithm: 2 pointers. Start fast pointer n nodes ahead of slow pointer, so that when fast pointer reaches at the end, slow pointer reaches at (n-1)st node, and then we can remove nth node from the end of the Linked List in a single traversal.

Code: https://github.com/Amitbhave/leetcode...

Time Complexity: O(n)


Sur cette page du site, vous pouvez voir la vidéo en ligne 11. Leetcode - Remove nth node from end durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Amit Bhave 11 juin 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 12 fois et il a aimé 1 téléspectateurs. Bon visionnage!