Added some code for sorted linked list.