I'm new to competitive programming and I'm wondering if you guys memorize or write down the algorithms that you learned. Thanks for the answer.

# | User | Rating |
---|---|---|

1 | tourist | 3748 |

2 | Benq | 3540 |

3 | Petr | 3470 |

4 | Radewoosh | 3355 |

5 | ecnerwala | 3347 |

6 | maroonrk | 3345 |

7 | jiangly | 3324 |

8 | scott_wu | 3313 |

9 | ainta | 3298 |

10 | boboniu | 3289 |

# | User | Contrib. |
---|---|---|

1 | 1-gon | 200 |

2 | Errichto | 196 |

3 | rng_58 | 194 |

4 | SecondThread | 186 |

4 | awoo | 186 |

6 | Um_nik | 182 |

7 | vovuh | 179 |

8 | Ashishgup | 176 |

9 | -is-this-fft- | 173 |

9 | maroonrk | 173 |

I'm new to competitive programming and I'm wondering if you guys memorize or write down the algorithms that you learned. Thanks for the answer.

↑

↓

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/02/2021 20:16:47 (g1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

Auto comment: topic has been updated by YandereDev (previous revision, new revision, compare).u dont have to memorize any algorithms if u dont want to. Its all about the practise. The more u practise the more it will easier to remember the techniques

I often memorize them, but sometimes I face a beautiful problem with strange observations, such as 1473G - Tiles, I will write it down and keep it in a notebook, so I can read it everywhere~

The first thing is you need to understand the whole details of each step of the algorithm that how it works and why it works. Then the next step involves to solve problems that use that particular algorithm. Hence this way, you again and again write down the code for the same algorithm such that it becomes your muscle memory which is the desired outcome.

For sure, this would not happen in just first/second try. Lets take an example of binary search. maybe for the first time you may write the never terminating loop. But this would for sure improve each time you write the code for it.

So, in short we do memorize and write down the algorithms we have learned. Wish you luck forward :)

All you need is logic. I was using kadane's algorithm even before I know there is a algorithm names kadane. Same with greedy and dynamic programming algorithms. Don't decide which algorithm to use just approach the solution with most basic logic you can think. You will be surprised to see that you used DFS, binary search and many other algorithms unknowingly.

I understand them way more often than just memorizing... the only data structure/algorithm I remember memorizing and not understanding how it works for a long time was fenwick tree. There are other things like simplex that I don't understand how it works but that's not commonly used at all so it didn't come into mind when first writing this comment.