Skip to content

Commit 68a665d

Browse files
committed
add js solution for leetcode 203
1 parent 4acacfc commit 68a665d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ LeetCode
226226
|206|[Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/)| |Easy|
227227
|205|[Isomorphic Strings](https://leetcode.com/problems/isomorphic-strings/)| |Easy|
228228
|204|[Count Primes](https://leetcode.com/problems/count-primes/)| |Easy|
229-
|203|[Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/)| |Easy|
229+
|203|[Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/)| [js](./algorithms/removeLinkedListElements/removeLinkedListElements.js) |Easy|
230230
|202|[Happy Number](https://leetcode.com/problems/happy-number/)| |Easy|
231231
|201|[Bitwise AND of Numbers Range](https://leetcode.com/problems/bitwise-and-of-numbers-range/)| |Medium|
232232
|200|[Number of Islands](https://leetcode.com/problems/number-of-islands/)| |Medium|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var removeElements = function(head, val) {
2+
if (head === null) {
3+
return null;
4+
}
5+
6+
head.next = removeElements(head.next, val);
7+
return head.val === val ? head.next : head;
8+
};

0 commit comments

Comments
 (0)