Add solution for linked list contains cycle.