Day 10 of July LeetCode Challenge

Input: head = [1,2,3,4,5,6,null,null,null,7,8,9,10,null,null,11,12]
Output: [1,2,3,7,8,11,12,9,10,4,5,6]
1---2---3---4---5---6--NULL
|
7---8---9---10--NULL
|
11--12--NULL
[1,2,3,4,5,6,null]
[7,8,9,10,null]
[11,12,null]
[1,2,3,4,5,6,null]
[null,null,7,8,9,10,null]
[null,11,12,null]
[1,2,3,4,5,6,null,null,null,7,8,9,10,null,null,11,12]

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store