Insertion Sort functions for LeetCode and LinkedListOperations