Driver Code
var head = newnode ( " " ) ; head . next = newnode ( " " ) ; head . next . next = newnode ( " " ) ; head . next . next . next = newnode ( " " ) ; head . next . next . next . next = newnode ( " " ) ; head . next . next . next . next . next = newnode ( " " ) ; head . next . next . next . next . next . next = newnode ( " " ) ; head . next . next . next . next . next . next . next = newnode ( " " ) ; document . write ( Majority_in_linklist ( head ) ) ;