File tree 1 file changed +0
-35
lines changed
1 file changed +0
-35
lines changed Original file line number Diff line number Diff line change @@ -33,41 +33,6 @@ func oddEvenList(head *ListNode) *ListNode {
33
33
return oddList .Next
34
34
}
35
35
36
- /*
37
-
38
-
39
- ListNode? oddEvenList(ListNode? head) {
40
- if (head == null || head.next == null) {
41
- return head;
42
- }
43
-
44
- ListNode? evenList = ListNode(-1);
45
- ListNode? oddList = ListNode(-1);
46
-
47
- ListNode? currentEven = evenList;
48
- ListNode? currentOdd = oddList;
49
-
50
- ListNode? current = head;
51
- int i = 1;
52
- while (current != null) {
53
- if (i % 2 != 0) {
54
- currentOdd?.next = current;
55
- currentOdd = current;
56
- current = current.next;
57
- } else {
58
- currentEven?.next = current;
59
- currentEven = current;
60
- current = current.next;
61
- }
62
- i++;
63
- }
64
- currentOdd?.next = evenList.next;
65
- currentEven?.next = null;
66
- return oddList.next;
67
- }
68
-
69
- */
70
-
71
36
// func oddEvenList(head *ListNode) *ListNode {
72
37
// if head == nil {
73
38
// return head
You can’t perform that action at this time.
0 commit comments