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

Автор Tmmaster, история, 15 месяцев назад, По-английски

Hello Codeforces! What algorithms should beginners learn?

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

»
15 месяцев назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится
»
15 месяцев назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

binary search

»
15 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

DFS,binary search.

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

learn Math

»
15 месяцев назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится
»
15 месяцев назад, # |
Rev. 7   Проголосовать: нравится 0 Проголосовать: не нравится

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.

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

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!

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

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

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

      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.

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

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