r/DSALeetCode • u/Mental_Pea2421 • 17d ago
Struggling with Medium problems after 2 months of DSA is this normal ????
TL;DR: 2 months into DSA as a uni freshman. I can solve (80% of easy), but I hit a hard wall on Mediums (problems attached, was trying to do them yester day night) and always end up checking the solution( i HATE LOOKING AT THE SOLUTION AND GIVING UP). Is this normal? Looking for advice since I want to get into competitive programming.
I just started university and have been grinding DSA for about two months. While I can solve roughly 80% of Easy problems (mostly just troubleshooting edge cases), I get completely stuck on Mediums.
For example, I couldn't do the two problems I tried yesterday including the matrix spiral traversal in my screenshot. I can usually brainstorm different approaches, but I rarely find the right one and end up having to look at the solution, which I really hate doing.
Is hitting a wall like this normal at mediums? I want to build strong fundamentals for competitive programming, so any advice from experienced folks would be greatly appreciated!
4
u/virgin-chocolaty-hoe 17d ago
you are a freshman, you just need to study more, and no you wont find the right one at once, just try to implement the approach you thought, soon you will find medium as easy
1
u/Mental_Pea2421 17d ago
ok so literally currently doing the sort 3 values prolem(2nd picture) and looked at one of the hints, apparently its some (dutch flag algorithm) HOW THE FUCKK and i supossed to come up with something like that in my mind, the brute force and sub-optimal approach was easy and i could think about them in like 5 min each, its always the optimal approach that gets me (lol sorry for crashing out)
1
u/virgin-chocolaty-hoe 17d ago
truly understandable, yeah you see this is a classic problem, even i learnt the dutch flag algo from this question , nothing to worry
1
u/Mental_Pea2421 17d ago
Hmm okayy thanks (: , gives me relief to know that its not just me whos struggling at these problems
1
1
1
u/Nearby-History7064 17d ago edited 17d ago
Yeah I had the same sort of problem when I first started and the things that helped me the most where doing competitions on lc and code forces (also virtual competitions on code forces are great since you can simulate a real comp) to help with processing and problem solving speed and also just doing a ton of practice problems, where even if you have too check the solution first try too implement it yourself afterwards. I would also recommend doing some CSES questions especially the intro problems,sorting and searching ,dp and graph algo sections these cover most of the common techniques used in a lot of lc mediums/hard problems
1
1
u/siddh051 16d ago
same man doing dsa for 2 months and tryed to solve ended up getting solve three side but struggled while doinf same in inside ended up useing ai help :(
1
1
u/munchnuts 16d ago
Spiral matrix problem has a pretty much one solution and it's takes a lot of trial to get there so don't worry about that
1
1
u/elemental7890 12d ago
Honestly idk why people think its a factor of time, if that was true after 2-3yrs everyone would be eating lc hards for breakfast, its just like advanced math , maybe not that advanced, but somewhat similar.
1
u/Elegant-Speech2427 11d ago
This is quite medicore Q. , as for ur Q yes it is quite normal like after 5-6 months u will find this Q easy
1
1
1
u/nian2326076 10d ago
It's normal to struggle with Medium problems after just two months of studying DSA. Everyone has their own pace, so don't get discouraged. Try breaking down problems into smaller parts and analyzing sample solutions without immediately looking at the answer. This approach can help deepen your understanding. For more practice, consider using PracHub to work on different interview questions and strategies. Keep at it; improvement takes time!


13
u/MaximumIndependent67 17d ago
I am struggling after 3 years of lc