* Utility function to prvar the circular linked list
function printList ( head ) { if ( head == null ) return ; var temp = head ; do { document . write ( temp . data + " " ) ; temp = temp . next ; } while ( temp != head ) ; document . write ( head . data + " " ) ; }