-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path83.js
More file actions
28 lines (28 loc) · 656 Bytes
/
83.js
File metadata and controls
28 lines (28 loc) · 656 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
25
26
27
28
// /**
// * Definition for singly-linked list.
// * function ListNode(val, next) {
// * this.val = (val===undefined ? 0 : val)
// * this.next = (next===undefined ? null : next)
// * }
// */
// /**
// * @param {ListNode} head
// * @return {ListNode}
// */
// var deleteDuplicates = function (head) {
// if (head == null) {
// return null;
// }
// let ptr = new ListNode(head.val, null);
// let result = ptr;
// while (head != null) {
// if (ptr.val !== head.val) {
// ptr.next = head;
// ptr = ptr.next;
// }
// head = head.next;
// }
// ptr.next = null;
// return result;
// };
qweqweqwewqewqe;