Amazonjuniorout. de 2024
Sort 0, 1, 2 (optimized to O(1) space and O(n) time)
Reorder an array of values 0, 1, and 2 in-place so all 0s come first, then 1s, then 2s (the Dutch National Flag problem); aim for a one-pass, constant-extra-space solution without using built-in sort.
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
Sort 0, 1, 2 (optimized to O(1) space and O(n) time)
Color n houses with k colors where no adjacent houses can have the same color, given that the colors of the first and last houses are fixed
Nenhum anexo público associado a esta pergunta.
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.