Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

313
Views
Genere una matriz de combinaciones de longitud fija que se incrementan en n (permutación de JavaScript)

Estoy investigando permutaciones y combinaciones e intentando generar una matriz de submatrices que tienen una longitud fija y se incrementan en cada combinación posible usando Javascript.

Por ejemplo:

 arrayMaxLength = 4 incrementToMax = 2 incremental = 0.25

Generar:

 [0,0,0,0], [0.25,0,0,0], [0.25,0.25,0,0], ..., [2,2,2,1.25], [2,2,2,1.50], [2,2,2,1.75], [2,2,2,2] ]

Intenté usar la "estructura de datos del montón" ( https://www.geeksforgeeks.org/heap-data-structure/ ) pero no pude generar números repetidos como 1,1,1,1 con o otras combinaciones como 1,2,2,1.

¿Hay alguna sugerencia sobre cómo lograr esto?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!