mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-14 19:41:41 +08:00
Merge branch 'dev' of github.com:justin-tse/hello-algo into justin-tse-dev
This commit is contained in:
@ -21,8 +21,8 @@ class ListNode {
|
||||
* @return
|
||||
*/
|
||||
arrToLinkedList(arr) {
|
||||
let dum = new ListNode(0);
|
||||
let head = dum;
|
||||
const dum = new ListNode(0);
|
||||
const head = dum;
|
||||
for (const val of arr) {
|
||||
head.next = new ListNode(val);
|
||||
head = head.next;
|
||||
|
Reference in New Issue
Block a user