Implement all the missing methods for the singly linked list.