Please read the new rule regarding the restriction on the use of AI tools. ×

linkhck's blog

By linkhck, history, 5 years ago, In English

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?

  • Vote: I like it
  • -1
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it +5 Vote: I do not like it

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 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    And how do you choose which algorithm to learn?

    • »
      »
      »
      5 years ago, # ^ |
        Vote: I like it +2 Vote: I do not like it

      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 years ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        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.