Challenge: Insertion at Tail

Now, we'll tackle the second insertion strategy in linked lists. However, you will be the one implementing it.

Problem Statement #

Just as heads and tails are polar opposites, this function is the opposite of what we saw in the last lesson. However, it is just as simple.

We need to insert a new object at the end of the linked list. You can naturally guess, that this newly added node will point to None as it is at the tail.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.