Here is the collection of best practices of common algorithm pattern I have seen on leetcode.
LinkedList
Fast and Slow Pointers
Java
1 2 3 4 5 6 7 8 9 10
/* If there is an middle node in the linkedList(e.g. 1->2->3->4->5, 3 is the middle node, versus 1->2->3->4, there is no middle node). then slow would point at the node after the middle node. Otherwise slow would point at the first node of the second half linkedlist. */