Skip to content

Data Structures and Algorithms

Cp (1)

  1. competitive programming. the other cp is elsewhere

Practice sites

Todo

refs: 1 2 3 4 5 problems: cses

data structures and algorithms

array

refs: 1 prefix sum suffix array

algorithms

sorting binary search two pointers: usaco cf academy cph 8.1 largest sum subarray (Kadane’s Algorithm)

string

rope

algorithms

KMP algorithm

graph

forest

algorithms

bfs dfs max flow topological sort

tree

heap Huffman tree trie binary search tree segment tree interval tree Fenwick tree range tree AVL tree suffix tree Treap (cartesian tree) k-d tree splay tree palindromic tree radix tree red black tree

other

linked list (singly, doubly, circular...) stack queue dequeue priority queue set map (hash table) matrix hash disjoint set sparse table suffix automaton

paradigms

dynamic programming

backtracking

greedy

math

complexity (big-O) math: * number theory: * primes (Sieve of Eratosthenes) * modular arithmetic * gcd, lcm (euclid's algorithm) * long arithmetic (mod, arbitrary precision math) * combinatorics * computational geometry * Handbook of geometry for competitive programmers * graph theory * discrete mathematics

resources

yt: williamfiset