# Competitive Programming

Competitive Programming can sharpen one’s mind, sometimes helps with one’s interview. This post is a note of Bjarki Ágúst Guðmundsson’s Competitive Programming course.

# Introduction

**Quickly classify problems**

- Ad Hoc
- Complete Search (Iterative/Recursive)
- Divide & Conquer
- Greedy (only the original ones)
- Dynamic Programming (only the original ones)
- Graph
- Mathematics
- String Processing
- Computational Geometry
- Some Harder Problems

**Rule of Thumb**

- operations per second
- .

**Algorithm Analysis**

n | Slowest Accepted Algorithm | Example |

Enumerating a permutation | ||

DP TSP | ||

DP + bitmask technique | ||

DP with 3 dimensions + loop, choosing | ||

Floyd Warshall’s | ||

Bubble/Selection/Insert sort | ||

Merge sort, building a segment tree | ||

Usually, contest problem have (to read input) |

# Data Structure

- Static arrays
- Dynamic arrays
- Linked lists
- Stacks
- Queues
- Priority Queues
- Sets
- Maps