Metamidjan. de 2026
Kth missing positive number
Given a sorted strictly increasing array of positive integers, find the k-th positive integer missing from the sequence. Observe that the count of missing numbers up to index i is arr[i] - (i+1), which lets you locate the correct interval and compute the answer in O(log n) with binary search.
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
Kth missing positive number
Nenhum anexo público associado a esta pergunta.
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.