> I have got a C++ competition tomorrow and it is very important for me.
I :D
can't :D
stop :D
laughing!

"tomorrow" - oh the jollity.
The very idea that you could hope to learn enough to take on any random assignment like the ones you posted with only 24 hours "experience" is comical.

> guide me on how do I solve them so that I get some preparation for tomorrow
Problem solving is a skill acquired over many months and years.

This isn't the matrix, you're not going to be able to just download this and calmly announce "I know kung fu". Someone (tomorrow) will just say "show me" and you're toast.


If (and I do me IF) someone does post the answers, you're not going to get anywhere just from staring at the code. Even if you memorise it, it won't tell you anything about how to solve the next one.


Save yourself the embarrassment, and quietly drop out of the competition "for personal reasons". Anyone who is even remotely prepared for this (not you) is going to take it away.

Lol...Did I say I had no preparations?

As far as I know, I have been preparing for this competition for quite some time now. I have been studying graphs, trees, shortest paths, backtracking, dynamic programming etc.

I don't want you to post the answers for me. I just need you to guide me.

As far as I know, I have been preparing for this competition for quite some time now. I have been studying graphs, trees, shortest paths, backtracking, dynamic programming etc.

Great, you've studied some things! Unfortunately for you but programming is not only studying, it also involves problem solving skills.
And as Salem has correctly pointed out these skills are only acquired over many years of exercising, there is no such thing as a 24-hour-rule for acquiring programming skills.
On the other hand, I wouldn't want you to not participate in the competition, it can still be useful for your "experience" :P

This article has been dead for over six months. Start a new discussion instead.