the title of the subject is misleading, here you want to solve a leetcode problem, nothing to do with creating an instance of ListNode