Leetcode 169: Majority Element. O(nlogn) is faster than O(n)!?

Publicado em: 11 Fevereiro 2024
no canal de: Teach Me Python
527
15

This could get controversial, but using built-ins might just be better than building your own clever solution even if the clever solution is of a faster time complexity at face value.

(I did test this on my own computer for lists from size 10 to 10000000, and every time built in sort beat out linear for loop.


Nesta página do site você pode assistir ao vídeo on-line Leetcode 169: Majority Element. O(nlogn) is faster than O(n)!? duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Teach Me Python 11 Fevereiro 2024, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 527 vezes e gostou 15 espectadores. Boa visualização!