Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя linkhck

Автор linkhck, история, 5 лет назад, По-английски

I have a simple question (or not). I am starting with competitive programming, I wanna know what's the best way to do it (I know that it's different for each one, but I want to know what you think is better). Is worth to learn about algorithms and read books and after solve problems or is better to solve as many problems as possible and learn about algorithm when I face it?

  • Проголосовать: нравится
  • -1
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

I prefer learning the algo first, do problems related to it then you will find out the variety of ways, of using it. After this, you get familiarized yourself with the algo and the questions that can be framed from it.

I hope it helps!. Happy coding :)

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    And how do you choose which algorithm to learn?

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +2 Проголосовать: не нравится

      Start with some basic algorithms, suppose Binary Search or graph algorithms like BFS, DFS. When you start solving problems of the algorithm you've learned, often you'll find problems which are on the same topic, but require a slightly different version of the algorithm you've learned (which usually has a different name). And so you'll end up learning that algorithm too, and the process is kinda continuous.

      • »
        »
        »
        »
        5 лет назад, # ^ |
        Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

        start with sorting, DFS, BFS, Binary Search and other Brute Force algorithms. Then do problems of it. When you can solve those algorithms easily, get to the next one u want to learn.