I have been active in competitive programming for around a year, have been solving problems like every day. But I still can't get over this problem. I almost never accurate codes on first try. If I have taken half an hour to write a code, I have to spend another half debugging it. This happens in almost all medium to large sized codes. How do I improve accuracy of code?
One of my friends recommended me to take 2 — 3 min before writing the code to think that how are you going to structure the code. this not only helps in writing code faster but also helps in reducing the errors if your algorithm for a problem is correct. Maybe this helps
I don't get the point of downvotes in these posts, did I break any rules, or did I ask any absurd question. And none of these guys downvoting has the guts to point out what's wrong with the post or whatever. Which shows the problem is with these people themselves, spineless and toxic. Anyways, keep up the good work, I farm downvotes.