Data structures and algorithms

Posted by Imaginary_Food_7102@reddit | learnprogramming | View on Reddit | 10 comments

How does one approach learning data structures and algorithms?

I'v been doing codewars mostly, and leetcode seems really hard for me, even on codewars i solve simple problems not heavy algorithmic ones. How do i approach leetcode problems? for example there is X problem where you need to know Y data structure and Z algorithm, should i research about Y data structure and Z algorithm and then solve problem or at first i should just try to solve it without any prior knowledge of the problem.