I have the following code:
/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} *