3 ms·
Both the switch and the if have O(1) instructions, so both are the same from an algorithmic complexity perspective.
by adrianN 3y ago
Both the switch and the if have O(1) instructions, so both are the same from an algorithmic complexity perspective.