Create the doubly linked list 18 < . 15 < . 8 < . 9 < . 14
head = push ( head , 14 ) ; head = push ( head , 9 ) ; head = push ( head , 8 ) ; head = push ( head , 15 ) ; head = push ( head , 18 ) ; document . write ( search ( head , X ) ) ;