I don't think it necessarily leads to a of mastery of data structures and algorithms in the context of leetcode/modern coding interviews. One can do a lot of coding, and even be paid for it, for years and just not even encounter a lot of this material. Though one will have developed much of the same intuition that you typically acquire in a data structures class, it doesn't necessarily mean you're prepared to code mergesort on a whiteboard.
On the other hand, mastery through 10 years of practice means and leads to a good knowledge of data structures and algorithms.