Update majority-element.cpp

Added a better solution that requires O(1) extra space.