I read the condition, thought about this condition for ~3 minutes, immediately came up with a solution, wrote it in about two minutes, launched my solution, it did not pass the tests, 1 minute was enough for me to understand that I did not take into account one point, I corrected the solution in 30 seconds and that’s it, I solved the puzzle. Let’s say that in total I spent 5-6 minutes reading + thinking about the condition + writing the solution + correcting the solution.
Everyone has logic, but not everyone knows algorithms and data structures, you just have little experience in solving problems to understand this.
1 Like