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 | Benq | 3797 |

2 | tourist | 3723 |

3 | Radewoosh | 3720 |

4 | ecnerwala | 3579 |

5 | ksun48 | 3463 |

6 | Um_nik | 3457 |

7 | maroonrk | 3446 |

8 | jiangly | 3432 |

9 | Petr | 3370 |

10 | scott_wu | 3350 |

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

1 | 1-gon | 209 |

2 | awoo | 184 |

2 | rng_58 | 184 |

4 | Errichto | 182 |

5 | SecondThread | 177 |

6 | maroonrk | 176 |

6 | Radewoosh | 176 |

6 | -is-this-fft- | 176 |

9 | Um_nik | 173 |

10 | antontrygubO_o | 169 |

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: Jun/23/2021 02:30:07 (i1).

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.