Why is Data Structures and Algorithms so Difficult?

0
6
Asked By TechnoWizard42 On

I'm a first-year computer science student and I just started learning Data Structures and Algorithms (DSA) with Java about 2.5 months ago. In that time, I've tackled over 20 pattern questions (like star and alphabet patterns), more than 30 problems related to arrays, and 13 binary search problems. I revise everything weekly, but I'm really struggling to retain what I've learned. It takes me a long time to solve even the easier problems, sometimes up to an hour and a half for tougher ones. I'm concerned because I'm forgetting the material quickly and feel stuck. Does anyone have advice on how to improve problem-solving skills and better retain the concepts in DSA?

4 Answers

Answered By CodeMaster99 On

Getting through DSA isn't easy, trust me! Keep grinding those problems, but don’t rely on just memorizing solutions. It’s essential to understand the underlying theory and intuition for the algorithms and data structures. Focus on the 'why' behind each solution. Combining repetition with a solid understanding is key to retention.

PuzzleSolver88 -

Let me try that approach too!

Answered By AlgorithmAce21 On

It seems like you're mixing up platforms like LeetCode with the fundamentals of DSA. DSA is a standalone subject that involves understanding how to store and manage data effectively, while platforms like LeetCode are just applications of those principles. Make sure to study DSA separately before diving into problem sets.

CuriousCoder22 -

Can you recommend any good textbooks for learning DSA, since I want to ace interview questions?

Answered By ProblemSmasher33 On

Keep at it and don’t spend too much time on each problem (max two hours). Look at the solution briefly if you're stuck, then code it out yourself. Memorizing someone else's code won't help you; realizing the concept and coding it from your understanding is what you need to focus on.

LearningCurves05 -

I’m not sure I like the idea of looking at the solutions instantly though. Wouldn't it be better to just get hints instead?

SupportiveStudent12 -

Okay, I’ll keep that in mind. Thanks for the advice!

Answered By DSAChallenger10 On

You're possibly focusing too much on predefined problems without grasping the theory first. Start with learning the concepts, implement them, and then solve problems using those concepts. Repeat that cycle for various structures. After that, tackle more complex problems to apply what you've learned. It's all about understanding first before applying it.

DataNinja44 -

Does step 4 mean I should learn specific algorithms like binary search or two-pointer techniques? I didn't quite get step 5.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.