Leetcode is not a means to learning best practices or going deep on some topic. It is a means to passing algorithmic interviews. Almost no leetcode "practitioners" will ever encounter the type of problems that require novel algorithm development. That's because these interviews do not resemble real world challenges most companies face. They exist solely to separate those who prep from those who don't. It's an effective measure for the big tech companies who get thousands of resumes per day. For most other companies it's unoriginal cargo culting. But it's also the reality we live in, so Leetcode continues to exist. Learning mathematics gets you further away from the goal of getting a job and is not practical (despite being a technically correct notion).