Instead of grinding LeetCode, learn mathematics, bro

Jose Crespo
2 min readMay 9, 2024

--

Let’s recruit a bunch of cheap LeetCoders

Let’s face the uneasy truth: without a deep knowledge of the mathematics behind grinding algorithms and data structures, like those on LeetCode, it is impossible to come up with original solutions to real, profitable engineering problems.

It doesn’t matter how many times you grind LeetCode challenges, for instance, those related to finding the shortest routes or some variation of the Dijkstra algorithm; if you don’t have any deep mathematical knowledge of the graph theory upon which it is based, you are painfully wasting your time. It is simple to see; just a slightly different formulation of the problem would be enough to expose you in the most painful way.

Yup, we all know that the tech industry is turned on by those LeetCode challenges and uses them in technical interviews. The result is a huge amount of false-positive candidates with a good memory for learning even a phone book but totally clueless when facing real problems where most toy LeetCode algorithms must be greatly tweaked and extended, or fail miserably.

Case in point:, most traffic and traffic calculation routes problems that Uber (even #Google ) has, those problems usually are NP but despite that, according to the domination graph theory(DGT) , it is feasible to transform them into P problems by finding upper and lower bounds most closer, for example, to the P-solution: gamma (G) lower or equal to q, where q is an integer or the minimal cardinality of the domination set. Uber seems to ignore that and use more error-prone and time-consuming heuristics than the more precise and less time-consuming lower and upper bounds. Why? because it is the way in which the Uber management class recruit their coders: they use the same “leetcode” plus PyTorch like hammers for everything.

As a consequence they are limited by:

1. Overreliance on Heuristics
heuristic methods for quick solutions, sacrificing optimal results and increasing inefficiencies.

2. Kill a fly with the cannon of AI and Machine Learning
Extensive use of AI and ML involves significant computational resources and investment, overcomplicating solutions where simpler mathematical methods could suffice.

3. Error-Prone Complex Solutions
AI and ML systems can be error-prone and biased, particularly if training data does not adequately reflect real-world conditions.

4. Neglect of Advanced Mathematical Theories
The Domination Graph Theory(DGT) , can yield precise solutions that are often overlooked.

5. Efficiency and Scalability.
MATHEMATICAL solutions lead to scalable, more cost-effective algorithms for large-scale urban traffic systems.

6. Simplification of Solutions
Incorporating traditional mathematical methods lead to simpler, more understandable algorithms that are easier to maintain than complex machine learning models.

--

--