majority finding algorithm

implementation of algorithm to find element which has occured more than
(n/2) times