No tienes acceso a esta clase

¡Continúa aprendiendo! Únete y comienza a potenciar tu carrera

Aprende todo un fin de semana sin pagar una suscripción 🔥

Aprende todo un fin de semana sin pagar una suscripción 🔥

Regístrate

Comienza en:

3D
4H
2M
51S

Notación Big O

7/11
Recursos

Aportes 5

Preguntas 1

Ordenar por:

¿Quieres ver más aportes, preguntas y respuestas de la comunidad?

o inicia sesión.

Como no veo este curso en los Recursos les dejo este curso que me ayudo a comprender Big O de una manera facil y rapida https://platzi.com/cursos/complejidad-js/

Les comparto un video en inglés, bastante comprensible explicando el tema de complejidad computacional:

www .youtube. com/watch?v=47GRtdHOKMg

  • Constant - O(1)
    Runtime does not depend on input size
    Example: Look up the first item
    [1,2,5]

  • Logarithmic - O(log(n))
    Runtime grows slower than the input size
    Example: Binary Search
    Search an element in an ordered list
    Open dictionary in half
    Check value
    See if is at the first half or the second half of the dictionary

  • Linear - O(n)
    The runtime grows at the same rate as the input.
    Example: Unsorted list

  • Log-Linear - O(n log(n))
    An operation of log(n) complexity for each input value
    Example: Efficient Sorting

  • Quadratic - O(n^2)
    An operation of complexity O(n) is carried out for each input
    Example: Check all pairs of input values (Double for loop)

  • Polynomial - O(n^3)…
    Computations with other exponents (n^4, n^5, etc)
    Example: Check all triplets of input values (Triple for loop)

  • Exponential - O(2^n)…
    Complexity is multiplied (doubled, tripled, etc) with each additional input value
    Example: Recursive Algorithms - Traveling salesman problem

  • Worse- O(n!)
    Runtimes can be worse than exponential
    Examples: Permutations

creo que lo correcto habría sido decir que las complejidades son O(log x), O(x) porque el eje es x, la otra opción es cambiar x por n para ilustrar mejor la relación entre el aumento de valores con su función