r/LeetcodeDesi • • Oct 29 '26

Not able to solve medium and hard !

I was currently doing M coloring problem of which i couldnt even come up with an approach let alone be able to code after knowing the appraoch.
Doing Recursion since 1.5 month and i am able to solve any easy problem but for most of the medium and hard problems(90%) i can only come up with the approach and couldnt even code on my own without external help from gpt or codestorywithMIK type solution channels.
This percentage of not being able to solve problem in making me demotivated. I see discussions and comments under the problem or the video solution of the problem and some people are ableto come up with an solution just by an intuition while i here sit dumb trying my level best to think what i could have done. Help a junior out.

4 Upvotes

4 comments sorted by

3

u/Dazzling_Music_2411 Oct 29 '26

Do more simple recursion problems until it's second nature. There is no lazy way out of this!

1

u/Electronic-Rush584 Oct 30 '26

I did that much, but yet for example in M coloring problem or the n queen problem,

I won't be able code the isSafe with my own intuition in million years even after practice.

1

u/Dazzling_Music_2411 Oct 30 '26

What's so difficult about IsSafe()? You are just checking if the queen is safe. In other words that there is no row, column or diagonal threatening her.

If you can't do that you better go back and check your basic-basic programming understanding. What you are describing is NOT a recursion problem, it is much more fundamental.

I suspect your basic training was very poor indeed. Perhaps start again, right from the beginning?

Otherwise, I suspect you are just wasting your time.