Review: Linked List Problems

Linked List demands skills of managing pointers very well.

Most problems are not that hard for you to solve. But to get bug-free, you need to think it through.

Key Points:

  • Add a dummyNode, if head node might be changed
  • How to process current node?
Make sure the pointers are in-order
  • How to move to next node?
If you have changed the original node, the next pointer might not be what you want
  • Whether we need to maintain the previous node?

Common Problems:

  1. Insert a Node in Sorted List
  2. Remove a Node from Linked List 3. Reverse a Linked List
  3. Merge Two Linked Lists
  4. Find the Middle of a Linked List

The most impressive problems to me:

See all linkedlist problems: #linkedlist

See more blog_posts.


Share It, If You Like It.

Leave a Reply

Your email address will not be published.