Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

205
Vistas
Difference in time complexity of toString and join of array

Is there any difference in time complexity between [1,2,3].toString() and [1,2,3].join() . As I understand time complexity of join function is O(n) . What is the time complexity of .toString() method ?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Both have the same time complexity. Array.prototype.toString calls Array.prototype.join without argument. ',' is the default separator.

MDN Spec

about 4 years ago · Juan Pablo Isaza Denunciar

0

toString() has the same time complexity of join(), the difference is that with join() is possible to choose the separator.

array.join([separator]);

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda