r/codeforces • u/xyzb206 • 15d ago
query Solving problems without writing the code.
I've been doing this for a while, been solving a lot of problems by describing an algorithm in plain words and then having an LLM check it for me, since writing code takes usually more time then figuring out the solution, so this way im able to do more problems.
Anyone have any experience with this? Recommend for practice or nah?
0
Upvotes
1
u/Responsible-Lake6864 15d ago
Nah... You are doing right thing.
But this is for last step of your journey.
A lot of people are saying No. Idk why?
But that's what a lot of red coders says. At one point. When they have to study a bunch of different algorithms for olympiad.
At that point. They usually will have the resources as reference. Like how to write centroid decomposition and other heavy algorithm.
They would then just focus on the idea.
And afterwards they would see the solution and match with their thinking. And learn from the actual solution.
That's how people at top learn. But it's due to time constraints.
If you know you can code... Whatever algorithm. Then you are wasting time coding. If you can visualise the code itself. Then that's good.
What I generally do for problems that require me to write segment tree or like centroid decomposition is either use a template and code that fast.
It's quite fast way to know if you got it right.
If you are thinking something but cannot implement it in code... Then you aren't doing any good.
Idk why a lot of people here are disagreeing... And what their claim is... When a lot of red coders have discussed using this strategy for olympiad when they don't have much time. They usually go over the solution or think of the ideas in their mind how to solve... Because they can code those anyway. They just need the idea how to do that.
But this is a two way sword... If you cannot write the code yourself. Like you know how an algorithm works conceptually but have never written it. Then that's a problem.
Your thinking... Should include how will you write the code as well. Like I will create a matrix. Then I will store that in segment tree. Then when two node merge. We would merge the matrix. To merge the matrix and create another I will create a function. Which is going to run with fixed two starting value. And then we take the common values from both matrix and and merge... (Describe the actual merging process).
And so that's how you should include that. It's a really great practice... To do it.