3 ms·
C doesn't have that either. Most commonly people just do a linear search. If you have a bigger array you can either use a library or roll your own almost-hash t
by qiqitori 4y ago
C doesn't have that either. Most commonly people just do a linear search. If you have a bigger array you can either use a library or roll your own almost-hash table-kinda-thing. It's not that complicated to roll your own because you already know your specific type of input. Implementing something that works for "any" type of input is harder.