dsa1 min read
Delete the Middle Node — Fast/Slow with Prev Pointer
Delete the middle node of a linked list using a prev-pointer variant of the fast/slow technique.
Read →
1575 articles
Delete the middle node of a linked list using a prev-pointer variant of the fast/slow technique.
Reverse nodes in each even-length group of a linked list by counting group sizes and selectively reversing.
Insert a value into a sorted circular linked list by finding the correct position with careful edge case handling.
Count the number of connected components of a linked list that consist of nodes in a given set.
Flatten a binary tree in-place into a linked list following pre-order using the Morris traversal approach.