Solution/src/solution/test.java

18 lines
424 B
Java

package solution;
import java.util.*;
import java.util.stream.Collectors;
public class test {
public static void main(String[] args) {
ListNode head = new ListNode(1);
head.next = new ListNode(1);
head.next.next = new ListNode(1);
head.next.next.next = new ListNode(2);
ListNode result = Solution.deleteDuplicates(head);
System.out.println(result.toString());
}
}