Linked List Manipulation Patterns — DSA Pattern

The Linked List Manipulation Patterns pattern applies when you need in-place reversal, merging sorted lists, reordering, and intersection detection. Its time complexity is O(n) and space complexity O(1). It is used in 17 problems on Thita, including Add Two Numbers, Intersection of Two Linked Lists and Merge Two Sorted Lists. Common variations are Reordering / Partitioning and In-place Reversal.

Master linked list manipulation including in-place reversal, merging sorted lists, detecting intersections, and reordering. Essential pointer manipulation techniques for interviews.

Linked List Manipulation Patterns is pattern 5 of 16 in the Thita.ai DSA course. It covers in-place reversal, merging sorted lists, reordering, and intersection detection, split into 5 subpatterns and about 2 hours of study. It is one of the interview-critical patterns, so it is worth covering before your first onsite.

Subpatterns of Linked List Manipulation Patterns

Each subpattern below has its own theory page and problem set. They are listed in the order the course teaches them.

  • In-place Reversal — Master in-place linked list reversal including full reversal, partial reversal, and k-group reversal techniques. (core technique)
  • Merging Two Sorted Lists — Learn to merge two sorted linked lists efficiently. Foundation for merge sort and k-way merge problems. (core technique)
  • Reordering / Partitioning — Learn to reorder and partition linked lists. Master techniques like swap pairs, rotate list, and odd-even separation. (important variation)
  • Addition of Numbers — Master adding numbers represented as linked lists. Handle carry operations and different list lengths. (depth topic)
  • Intersection Detection — Learn to find the intersection point of two linked lists using the two-pointer technique. (depth topic)

How to practise Linked List Manipulation Patterns on Thita.ai

Read the theory for a subpattern, then solve its problems in the browser editor. Your solution runs against the problem's test cases, and the AI coach gives a hint on the technique you are missing rather than the finished answer. Progress is tracked per subpattern, so the tracker shows which of the 5 Linked List Manipulation Patterns subpatterns you have covered. Topics covered here include linked list, linked list reversal, merge linked lists, linked list intersection, linked list manipulation, pointer manipulation, singly linked list, doubly linked list.

Related DSA patterns

Preparing this lesson and its course outline.