-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
25 lines (21 loc) · 715 Bytes
/
Main.java
File metadata and controls
25 lines (21 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package leetcode._24_;
import leetcode.common.ListNode;
/**
* Created by zhangbo54 on 2019-03-04.
*/
public class Main {
public static void main(String[] args) {
Solution solution = new Solution();
ListNode node = new ListNode(1)
.setNext(new ListNode(2)
.setNext(new ListNode(3)
.setNext(new ListNode(4))));
System.out.println(node);
System.out.println(solution.swapPairs(node));
node = new ListNode(1)
.setNext(new ListNode(2)
.setNext(new ListNode(3)));
System.out.println(node);
System.out.println(solution.swapPairs(node));
}
}