79392110

Date: 2025-01-27 20:42:28
Score: 1
Natty:
Report link

The big-o notation for an arbitrary switch case structure depends on the implementation details used in the lookup.

The only real answer for your question can be achieved by either defining the question more carefully or by writing a lookup using a given tool and then testing how it scales.

Both O(1) and O(N) can reasonably be argued for if no further constraints are given.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Markus Hirsimäki