coding skills

Hello everyone.I want to improve my coding.I always participate in programming contests and hardly solve one or two problems.when i saw others code i got stuck to see that how they write in nice way and in efficient way.I always try hard for that but unable to do so.this discourage me.Please someone give some basic idea about that,so that i can also do better in contests.Thanks.

@nitya

Hello friend,

Two months back i was in same situation, i will not say there is a lot change in my current situation but at present i am able to solve 3-4 problems.

First of all if you are not able to solve problems what is the actual problem you are facing?

Are you not able to think about the solution or your are finding difficult to make correct code i.e. you tried but code fails to produce correct results?

If you are trying but your code is not correct and you are not able to figure it out whats wrong then think as a teacher want to evaluate your code and do not want you to succeed, so what can be the weirdest test which teacher can input that result in WA ?
If you really are not able to figure such input, then best way is generate random input, make a script which generate random input for your problem and check manually at which input your code Fails…

This method will help you a lot for code testing and making a bug free code.

Now if your are not able to prepare a solution or algorithm then read the question thoroughly few times apply some brain storming search for tags on internet jot all the points on paper then try to figure the approach. If this still not help solve some practice problems on various sites and search for a similar question, because many questions are similar just approach are different.

If you have figured out what is the problem but unable to code it think of manually solving that problem now as your brain responds for the solution try to code the same approach your brain have used, what will happen your algorithm will be weak … doesn’t matter first try to get Correct ans then think of optimizing it.

Important Point: Always read Editorials after every contest to understand the best approach if you have problems post it on discussion forum there are many good and excellent coders to help us… !!

Hope you will be able to perform well…

Best Wishes… :slight_smile:

Also do get discouraged… the worst case is when you get discouraged and your brain stop responding to such situations…
If you are not able to make code practice a lot, solve more and more practice questions try to think more approach for one question after it is solved, understand each concept…

Thank you very much…