Function to rearrange
function rearrange ( head ) { if ( head != null ) { left = head ; reorderListUtil ( left ) ; } } function reorderListUtil ( right ) { if ( right == null ) { return ; } reorderListUtil ( right . next ) ;