Added majority element code