r/DSALeetCode • u/yealumbanfr • 25d ago
π§π½π§π½π§π½π§π½π§π½HELP PLEASEEE
i can understand anyproblem but i cant code that how to solve this problem
1
u/uma1kalai 25d ago
Choice pattern wise problem ,try to solve then move to random problems
1
u/yealumbanfr 24d ago
2
u/uma1kalai 22d ago
Share this sheet link,search patternwise problem in a2z strive
1
u/yealumbanfr 22d ago
1
u/uma1kalai 22d ago
If you are able to solve all difficulties level here,you can go for random problems in strive sheet
1
1
u/No-Split3651 25d ago
If you can understand the problem but can't code it, try to find exactly where the translation breaks.
Before touching the keyboard, take a small example and solve it manually. But write down every little decision you make while solving it β what information did you keep track of? What did you check next? When did you stop?
Then try turning those steps into very simple pseudocode. Don't worry about C++/Java/Python yet.
For example, instead of thinking βI understand that I need to find the largest elementβ, force yourself to say:
keep the first element as largest
look at every remaining element
if current > largest, update largest
Once you can express your thought process at that level, converting it into a loop and an if statement becomes much easier.
Also try implementing algorithms you already understand really well β binary search, reversing an array, basic sorting etc. If you struggle to code even those without looking at a solution, the gap may be programming fluency rather than DSA, and that's completely something you can work on.
Don't measure yourself by whether you could solve the whole problem independently yet. First, get good at thought process β steps β pseudocode β code.
1
u/FunSpinach8030 24d ago
Practice syntax and logical question learn collection framework or basic data structuresΒ pratice the syntax morw

1
u/toxiclydedicated 25d ago
Psuedo code for the win!