How do you learn from your mistakes? Like how do you learn from the solution? Even if I understand the solution, I am not able to generalize the answer to the one problem to others of the same type.
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3741 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3489 |
7 | Radewoosh | 3483 |
8 | Kevin114514 | 3442 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
2 | atcoder_official | 162 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | nor | 150 |
How do you learn from your mistakes? Like how do you learn from the solution? Even if I understand the solution, I am not able to generalize the answer to the one problem to others of the same type.
Name |
---|
e.g. when I looked at a dp solution for a medium leetcode problem, I couldn't generalize to an easy problem without looking at the hints.
Because CP isn't about generalizing it's about learning to think and problem solving.
But also, like every time before I get an AC, I have to make like 5 wrong submissions, most of which are dumb mistakes. How do you prevent that?
solve more problems
Learning from your mistakes is only part of getting better. You won't be able to generalize the answer from one problem to another by only looking at your mistakes.
I'm new to this whole competitive coding thing, but it seem a lot like chess -- something I am much, much more experienced in.
Now in chess you won't get much better if you only look at the mistakes in your games -- although this is something that you need to do to improve. Looking at the mistakes helps identify the areas in which you are weak, from there you can identify what you need to improve on and then practice in that area.
Say for instance you lost a game because you missed a fork. Well, this suggests that you should brush up on this particular tactic. Now keep in mind, if you solve a chess tactic that is rated 1800 that uses a sacrifice and a fork that doesn't mean you are going to encounter that exact sacrifice and fork tactic in your future games (or ever again for that matter) nor are you necessarily rate at 1800 -- however, you are training your brain to pick up on this tactic subconsciously. You become aware of the idea that such a thing can be done. If you are new to chess it's one thing to learn what a fork is, it is then another thing to recognize it in a different situation.. how good you are is in part predicated on how well you can recognize these patterns and how fast you are at finding them.
Similarly in coding, in order to get better look at what your mistakes are. If it is DP then do problems that involve DP and then do random problems were you must realize that DP is the solution. If you are making a lot of small blunders -- silly mistakes -- then keep practicing.
Another key takeaway here when learning something new/ trying to improve is consistency -- you must consistently do problems or else you brain will forget and you lose all that practice you've done.
are you from quora
No? Why is there something wrong with my advice?
Just codeforces things
... my answer is directly related to OP's question. Am I not allowed to give an analogy to help elucidate a concept?
I think, a known/popular analogy would have been helpful. But in this case personally I don't know anything about chess, and I think many people would have not got anything that you have said about fork, sacrifice and all that stuff, and maybe that's why they have downvoted. :-\
because your comment makes a wise and well-thought-out impression, but it consists mainly of obvious statements, and no true insight. anyone can give such "advice", even people who have never programmed.
this is exactly what people on quora do when they see a question they can't answer but still want to say something: write a long text with 0 content that looks smart. random forced analogies are the bread and butter. only thing missing is an unrelated pic of a webcomic or hot girl
No need to be so vitriolic; now, how am I forcing any analogies? Learning from your mistakes applies to many, many subjects. It seems fitting to give an analogy to help explain the concept that I am talking about, especially since chess competition and code competition share several qualities -- such as, thinking analytically and logically, studying, worrying about time limits and making the wrong decisions, practicing rudiments to build a solid knowledge foundation, an ELO type rating system, etcetera, etcetera. Secondly, I think it is worth mentioning here that things that you may find so obvious may not be so obvious to others -- they weren't obvious to me at one point in my life and I had to learn things the hard way.
what is your Lichess profile?
found u lol https://lichess.org/@/TheMonsoon
?
I (the person who is typing this comment) have found the account (a persistent, long-term identity associated with a service) associated with you (the user named TheMonsoon) on Lichess.org, a free and open source website for playing chess (an ancient board game in which pieces move around and the objective is to checkmate the king). The URL (uniform resource locator) associated with this account is https://lichess.org/@/TheMonsoon. Please note that this was a best-effort guess made by inputting your username here into the Lichess profile search and may not be 100% accurate. Thank you and have a great day.
No need to be patronizing. I just find it odd that you would take the time to dig up a lichess account and post in on this website.
The chess analogy is kinda forced here buddy.
#chessBrah #habitsBrah #Forever1500Crew
In what way is it forced? The principle of analyzing your mistakes and then taking that analysis and practicing to improve is the same.
Nothing wrong with it, I agree with your advice and understand it. But someone who doesnt know/care about chess will not benefit much from it. Mostly the fourth paragraph doesnt look non chess folks friendly.
I know some chess so I guess it's fine. thanks tho
Then they should start playing chess
How much important is Fenwick Tree for Competitive Programming?
Very, above 1800-1900
There's an 1800 problem with uses segment tree. 1549D - Integers Have Friends. Probably more too. I know lazy propagation segment tree has appeared in 2100 rated problems (I forgot the problem tho).
tl;dr fenwick tree is important (and also elementary, in that it's easy to understand)
It's irrelevant, just learn how to copy paste it and learn segtree instead
There is a union of humorists in the comments above
After getting accepted for a problem think about what cost you the most time on that problem? Is it thinking, implementation, debugging, or any other thing? Then think about how you can reduce the time. Then think about when you are thinking about the problem which path gives you no solution and how you can avoid that path. After understanding others' solutions (from the tutorial or somewhere else) think about how you can go that solution logically without guessing from reading the statement. Smooth your thought path for that problem. Note your mistakes and when you make a mistake (new or old) you can read through all of the mistakes you have done so far as punishment (don't mind, just fun).
Your problems might have two causes, not understanding DP or not having enough thinking ability.
If you find yourself good on problems without using DP, then i suggest you to learn more classical model of DP, and then try to solve more DP problems. Because generalizing a method is not easy before you fully understand it.
If you find yourself bad at learning in analogy, that is probably caused by insufficient thinking. Try best to make yourself totally understand the algorithm, you can write editorial after you solve a problem, or share solution with your friend. Teaching others is also a nice way to check if you have totally understand the problem or not. Meanwhile I prefer USACO/Codeforces rather than leetcode. Problems on Atcoder are also very nice but it's not good to learn a specific topic.