How should I approach competitive programming? Should I first learn the necessary algorithms and data structures and then start solving questions or should I try to solve the problem with basic mathematical knowledge and when I cannot do that then I learn the necessary algorithm?
There is no need in learning any data structure, when you even didn't met problem on this topic. Feel your helplessness in solving problems, where required knowledge of data structures. It's the first step.