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

218
Vistas
best data structure for table

I'm trying to find the best data structure for visualize this UI: enter image description here

I'm using javascript/typescript with Angular and I should be able to add/remove/update items. Please consider also that I will have lot of rows and columns and up to 100 non-repeated items in each cell. So far I'm considering this data structure:

var data = new Map<string, Map<string, Set<Item>>>();

where the strings are rowKeyN and columnKeyN and Set contains the items in each cell.

This kind of datastructure seems a bit complicated to use but is the best that I found in terms of performance. What do you think? Thank you in advance.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Bumped into this question - you should look at Guava's (for Java) Table representation - where the last case you would get a List

see more details here for Guava's table

but in short: taken from the docs:

Table<Vertex, Vertex, Double> weightedGraph = HashBasedTable.create();
weightedGraph.put(v1, v2, 4);
weightedGraph.put(v1, v3, 20);
weightedGraph.put(v2, v3, 5);

weightedGraph.row(v1); // returns a Map mapping v2 to 4, v3 to 20
weightedGraph.column(v3); // returns a Map mapping v1 to 20, v2 to 5

In your case it would be Table<Vertex,Vertex,Array>

I came here while trying to search something like the above for Typescript - I haven't found it - yet - if anyone knows of such an implementation - let me know

over 4 years ago · Santiago Trujillo 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