Coursera-Algorithmic-Toolbox icon indicating copy to clipboard operation
Coursera-Algorithmic-Toolbox copied to clipboard

Update 4.2 majority.py

Open KUMN opened this issue 3 years ago • 0 comments

Majority function should return -1 in case the sequence is of size 2 and each member is unique. However this code will provide the left member. To correct it simply comment lines 9 and 10.

KUMN avatar Jan 15 '22 01:01 KUMN