Tmmaster's blog

By Tmmaster, history, 16 months ago, In English

Hello Codeforces! What algorithms should beginners learn?

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

| Write comment?
»
16 months ago, # |
  Vote: I like it +8 Vote: I do not like it
»
16 months ago, # |
  Vote: I like it +19 Vote: I do not like it

binary search

»
16 months ago, # |
  Vote: I like it 0 Vote: I do not like it

DFS,binary search.

»
16 months ago, # |
  Vote: I like it +8 Vote: I do not like it

learn Math

»
16 months ago, # |
Rev. 7   Vote: I like it 0 Vote: I do not like it

Hi @Tmmaster

For beginners in competitive programming, it's important to focus on algorithms and data structures that are commonly encountered in programming contests. These algorithms and data structures will help you solve a wide range of problems efficiently. Here's a list of some essential algorithms and data structures to start with:

Algorithms:

  1. Sorting Algorithms: Learn basic sorting algorithms like Bubble Sort, Selection Sort, and Insertion Sort. Then, move on to more efficient ones like Merge Sort and Quick Sort.

  2. Binary Search: Understand how binary search works and its applications in searching and optimizing problems.

  3. Greedy Algorithms: Learn about greedy strategies and their application in solving problems where you make locally optimal choices at each step to reach a global optimum.

  4. Dynamic Programming: This is a crucial concept. Start with the basics and gradually progress to more complex problems. Learn about memoization and tabulation techniques.

  5. Graph Algorithms:

  • Dijkstra's Algorithm: For finding the shortest path in weighted graphs with non-negative edge weights.
  • Depth-First Search (DFS): Useful for traversal and finding cycles in graphs.
  1. Divide and Conquer: Understand the concept of breaking a problem into smaller subproblems, solving them, and then combining the results.

Data Structures:

  1. Arrays and Lists
  2. Stacks and Queues
  3. Linked Lists
  4. Hashing
  5. Trees: (Binary Tree, Binary Search Trees, Heaps)

Remember that competitive programming is not just about memorizing algorithms, but also about practicing and applying these concepts to various types of problems. Start with easier problems and gradually work your way up to more challenging ones as you become more comfortable with these algorithms and data structures.

  • »
    »
    16 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    That last paragraph sounds like great advice for you personally. Most of what you mentioned is not needed to get pupil.

»
16 months ago, # |
  Vote: I like it +5 Vote: I do not like it

If you're new to sky diving you should first consult a doctor who will determine if you are capable of sky diving in the first place. Afterwards I recommend purchasing a membetship in a skydiving school. Only do trainings under supervision of a professional!

  • »
    »
    16 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    This is a stupid comparison because sky diving can actually kill you. The worst thing cp can do is waste your time.

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

      Modern skydiving is very safe. Skydivers take many precautions to ensure safety, such as the requirement of having 200 jumps before even bringing a camera for example. This is not to say it can't kill you, but nowadays the chances are quite low.

      • »
        »
        »
        »
        16 months ago, # ^ |
          Vote: I like it +10 Vote: I do not like it

        Ok sure, but I think we can agree that is still more dangerous than cp