5 ms·
It's linear with respect to the number of cases, not the size of inputs. It's still O(1) in the sense of algorithmic complexity.
by Gazoche 2y ago
It's linear with respect to the number of cases, not the size of inputs. It's still O(1) in the sense of algorithmic complexity.