forked from trekhleb/javascript-algorithms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pt-BR translation to search/linear-search (trekhleb#663)
- Loading branch information
1 parent
8bd329d
commit 47d5c8f
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Busca Linear | ||
|
||
_Leia isso em outras línguas:_ | ||
[english](README.md). | ||
|
||
Na Ciência da Computação, busca linear ou busca sequencial é um método para encontrar um elemento alvo em uma lista. | ||
O algoritmo verifica sequencialmente cada elemento da lista procurando o elemento alvo até ele ser encontrado ou até ter verificado todos os elementos. | ||
A Busca linear realiza no máximo `n` comparações, onde `n` é o tamanho da lista. | ||
|
||
![Busca Linear](https://www.tutorialspoint.com/data_structures_algorithms/images/linear_search.gif) | ||
|
||
## Complexidade | ||
|
||
**Complexidade de Tempo**: `O(n)` - pois no pior caso devemos verificar cada elemento exatamente uma vez. | ||
|
||
## Referências | ||
- [Wikipedia](https://en.wikipedia.org/wiki/Linear_search) | ||
- [TutorialsPoint](https://www.tutorialspoint.com/data_structures_algorithms/linear_search_algorithm.htm) | ||
- [Youtube](https://www.youtube.com/watch?v=SGU9duLE30w) |