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

179
Vistas
How do I get the position of the closed bracket that belong to the first open bracket using javascript?

How do you get the string position of the closing bracket that belongs to the first bracket? The beginning of the string is always a {.

Sample input:
 1. latex = "{123{4}{5}{6}789}101112"
 2. latex2 = "{1{2}{3}}”
 3. latex3 = “{1{2}{3}}{4}{5}

Sample output: 
 1. getcBracketPosition(latex)  // return 16
 2. getcBracketPosition(latex2) // return 7
 3. getcBracketPosition(latex3) // return 7

How do I write the function, getcBracketPosition(latex)?

about 4 years ago · Juan Pablo Isaza
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