modify linkedlist class to be consistent with leetcode OJ