Skip to content

Commit 089b1e1

Browse files
vil02appgurueu
authored andcommitted
docs: fix broken links to binary search
1 parent 241a154 commit 089b1e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: en/Search Algorithms/Exponential Search.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#### Prerequisites
44

5-
- [Binary Search algorithm](https://github.com/faridevnz/Algorithms-Explanation/blob/master/en/Search%20Algorithms/Binary%20Search.md)
5+
- [Binary Search algorithm](Binary%20Search.md)
66

77
#### Problem Statement
88

@@ -39,7 +39,7 @@ Now we can apply the binary search on the subarray from 512 and 1_000.
3939
#### Complexity Explanation
4040

4141
- The complexity of the first part of the algorithm is **O( log *i* )** because if *i* is the position of the target in the array, after doubling the search *index* `⌈log(i)⌉` times, the algorithm will be at a search index that is greater than or equal to *i*. We can write `2^⌈log(i)⌉ >= i`
42-
- The complexity of the second part of the algorithm also is **O ( log *i* )** because that is a simple Binary Search. The Binary Search complexity ( as explained [here](https://github.com/faridevnz/Algorithms-Explanation/blob/master/en/Search%20Algorithms/Binary%20Search.md) ) is O( *n* ) where *n* is the length of the array. In the Exponential Search, the length of the array on which the algorithm is applied is `2^i - 2^(i-1)`, put into words it means '( the length of the array from start to *i* ) - ( the part of array skipped until the previous iteration )'. Is simple verify that `2^i - 2^(i-1) = 2^(i-1) `
42+
- The complexity of the second part of the algorithm also is **O ( log *i* )** because that is a simple Binary Search. The Binary Search complexity ( as explained [here](Binary%20Search.md) ) is O( *n* ) where *n* is the length of the array. In the Exponential Search, the length of the array on which the algorithm is applied is `2^i - 2^(i-1)`, put into words it means '( the length of the array from start to *i* ) - ( the part of array skipped until the previous iteration )'. Is simple verify that `2^i - 2^(i-1) = 2^(i-1) `
4343

4444
After this detailed explanation we can say that the the complexity of the Exponential Search is:
4545

Diff for: es/Algoritmos de búsqueda/Búsqueda exponencial.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#### Requisitos previos
44

5-
- [Algoritmo de búsqueda binaria](https://github.com/faridevnz/Algorithms-Explicación/blob/master/en/Search%20Algorithms/Binary%20Search.md)
5+
- [Algoritmo de búsqueda binaria](Búsqueda%20binaria.md)
66

77
#### Declaración de problema
88

@@ -39,7 +39,7 @@ Ahora podemos aplicar la búsqueda binaria en el subarray de 512 y 1_000.
3939
#### Explicación de complejidad
4040

4141
- La complejidad de la primera parte del algoritmo es **`O( log *i* )`** porque si *i* es la posición del destino en la matriz, después de duplicar la búsqueda *index* `⌈log(i)⌉` veces, el algoritmo estará en un índice de búsqueda que es mayor o igual que *i*. Podemos escribir `2^⌈log(i)⌉ >= i`
42-
- La complejidad de la segunda parte del algoritmo también es **`O ( log *i* )`** porque se trata de una simple búsqueda binaria. La complejidad de búsqueda binaria ( como se explica [aquí](https://github.com/faridevnz/Algorithms-Explicación/blob/master/en/Search%20Algorithms/Binary%20Search.md) ) es `O(*n*)` donde *n* es la longitud de la matriz. En la búsqueda exponencial, la longitud de la matriz en la que se aplica el algoritmo es `2^i - 2^(i-1)`, en palabras significa `(la longitud de la matriz de principio a *i* ) - (la parte de matriz omitida hasta la iteración anterior)`. Es simple verificar que `2^i - 2^(i-1) = 2^(i-1)`.
42+
- La complejidad de la segunda parte del algoritmo también es **`O ( log *i* )`** porque se trata de una simple búsqueda binaria. La complejidad de búsqueda binaria ( como se explica [aquí](Búsqueda%20binaria.md) ) es `O(*n*)` donde *n* es la longitud de la matriz. En la búsqueda exponencial, la longitud de la matriz en la que se aplica el algoritmo es `2^i - 2^(i-1)`, en palabras significa `(la longitud de la matriz de principio a *i* ) - (la parte de matriz omitida hasta la iteración anterior)`. Es simple verificar que `2^i - 2^(i-1) = 2^(i-1)`.
4343

4444
Después de esta explicación detallada, podemos decir que la complejidad de la búsqueda exponencial es:
4545

0 commit comments

Comments
 (0)