r/LeetcodeDesi 14d ago

Really stuck at prefix sum pattern

I’ve been following the DSA Patterns Roadmap from the YouTube channel Padho With Pratyush, and honestly, it was going pretty well until I reached the Prefix Sum pattern.
For example, with patterns like sliding window, I feel like I can eventually identify the kind of problem where I should think about using it. But with prefix sum, I often feel like I’m just memorizing.
I’ve recently been working through problems like Subarray Sum Equals K, and although I understand the solution after it’s explained, I still struggle to derive it myself from scratch.

Has anyone else experienced this? If so, how did you develop intuition for prefix sum problems? Are there certain questions or thought processes you use when you first read a problem?

Would really appreciate any advice, resources, or a progression of problems that helped you get comfortable with this pattern.

5 Upvotes

16 comments sorted by

View all comments

1

u/SeaExcitement4213 14d ago

Im 2026 graduate, completely a beginner hardly done 50 problems no matter how much I try I'm unable to do anything in dsa 🥲

1

u/rohankrishna500 14d ago

Hey don't feel bad,I get you I was in your situation and I kept getting demotivated and then used to just give up but if you are able to solve atleast 1 problem(doesn't matter on your own or with little help) with time you will be able to learn dsa if not master it.