Added the toString() function to LinkedList