Reproducing Code

it sometimes becomes hard to reproduce some code precisely correctly… for eg… once i wrote a program for RMQ using segment trees… it took me real time to understand the topic… but if someone asks me to again reproduce the code without help on internet, i won’t be able to do it accurately…is is normal or i lag practice…?

Yes…practice is the key…keep on solving a few problems related to that particular algo to gain fluency…as an example…1st implementing DFS was such a pain…solved a few sums related to it and then gained confidence over it…so just keep on trying a few sums looking at the codes that you have previously written or maybe algos to gain fluency…also it is very important to understand that algo…1st it may not be that clear…but eventually as u understand that what ne particular part of the code is doing then it will be very easy to implement ne algo at ne given point of time…hope this helps…:slight_smile:

You lag practice You have lot of online judges where u can practice coding. At the same time Dont try to remember the code snippets or algorithms. Try to understand them because in most of the problems u r expected to make slight changes to basic algorithms and U can successfully implement it only if u understand that particular algorithm to core and it’s applications. Once u have a complete idea of how a algo work’s then U can Easily Implement It with a little bit practice :slight_smile:

Happy coding :slight_smile:

is it normal for a coder to copy some code from other sites during a running contest…? not exact solution , but the implementation…coz i see a lot of people doing it… ? what i think is that it i of no use unless all you are concerned is your ratings and not the learning…

What ar u coding for??? rating??? Then U are a loser :\ U should have passion for coding :slight_smile:

yeah you are right…