Rename 'elements' input parameter to 'elementsWithColors' and that array would contain elementId+color pairs.
Change 'highlightedColor' input parameter to array and rename it to 'highlightedColors'. This way the size of this array must match the size of the elements array. So the color of elements[i] would be highlightedColors[i].
Make 'highlightedColorsOfElements' input parameter which would define a color for a group of elements, so that array would define color+elements pairs. This way it's easier to group elements with the same color.
At first I implemented the 1st solution in C++, but I found it hard to use in tapir_py/core.py, so finally I chose the 2nd solution.
From C++ point of view, each has almost the same complexity.
Which would our python developers choose?
I tried 3 solutions:
At first I implemented the 1st solution in C++, but I found it hard to use in tapir_py/core.py, so finally I chose the 2nd solution.
From C++ point of view, each has almost the same complexity. Which would our python developers choose?