Added boyer-moore voting based algorithm