2 ms·
Sometimes just moving a .find into a precomputed hashmap can be the difference between O(n^3) and O(n). The difference is important with n as low as 100. It's
by Swizec 10y ago
Sometimes just moving a .find into a precomputed hashmap can be the difference between O(n^3) and O(n). The difference is important with n as low as 100.
It's that intuition which is valuable, not the implementing of algorithms by name.