ListNode head = new ListNode(list.get(0)); ListNode temp = head; for(int i=1;i<list.size();i++){ temp.next = new ListNode(list.get(i)); temp = temp.next; }
点赞 1
牛客网
牛客企业服务