container

  • begin(), end()
  • rbegin(), rend()
  • size()

vector

Resizable array.

  • Constructor: vector(), vector(size), vector(size, fill)
  • push_back(val)
  • pop_back()

list

Implements double-linked list.

  • insert(it)

Insert before it. it == end(): insert at the end.

  • erase(it)

Erase item at it. Return item after it.

string

  • Constructor: string(size, fill)
  • length()
  • substr(begin), substr(begin, count)

Obtain a substring.

set / unordered_set

  • insert(val)
  • erase(val), erase(it)
  • find(val)

Return it, or end() if not found

  • count(val)

map

  • insert(pair(key, val))
  • at(key)

Return val, throws if missing.

  • find(key)

Return it, or end() if not found