compare the data members of the two linked lists and put the larger one in the result
var result ; if ( a . data < b . data ) { result = a ; result . down = merge ( a . down , b ) ; } else { result = b ; result . down = merge ( a , b . down ) ; } result . right = null ; return result ; } function flatten ( root ) {