DEV Community

Discussion on: LeetCode 328. Odd Even Linked List (javascript solution)

Collapse
aarone4 profile image
Aaron Reese

Can't write code on the phone...
ArrOdd = arrOriginal.filter(i, idx) => idx % 2 == 0
ArrEven = arrOriginal.filter(i, idx) => idx % 2 == 1
Return (arrOdd...arrEven)