function to create a new node
static Node createNode ( int data ) { Node temp = new Node ( ) ; temp . data = data ; temp . next = null ; temp . prev = null ; temp . up = null ; temp . down = null ; return temp ; }