Leetcode - Majority Element II (Python)

preview_player
Показать описание
September 2020 Leetcode Challenge
Leetcode - Majority Element II
Рекомендации по теме
Комментарии
Автор

if there's a majority element iii problem im gonna lose it! thanks Tim!

janmichaelaustria
Автор

love how he called Boyre-Moore algo as Moyre-Boore

TheRj
Автор

A faster solution ==>
r = len(nums)/3
res = []
for in list(set(nums)):
if nums.count() > r:
res.append()

return res

siddharthsingh
Автор

Thank you soo soo much it help me a lot

vikasrathore
Автор

Hi, could you provide more detail of the proof of this algorithm? If the question is asking for majority element more than [n/4] times, similar solution could be used?

tdmllama
join shbcf.ru