Advanced solutions hide their cost in the data structure. A heap operation is O(log of the heap size), not O(1). A BFS visits every reachable node and edge once. A memoized recursion costs the number of distinct states times the work per state, plus the depth of the call stack in space.
Some costs are amortized: a dynamic array that doubles when full copies everything occasionally, but n appends still take O(n) in total, so one append is O(1) on average and O(n) at worst. Say "amortized" when you mean it.
For graphs, use V for nodes and E for edges, and say which term dominates. Dijkstra with a binary heap is O((V + E) log V); BFS is O(V + E). For dynamic programming, count the table size: two strings of lengths m and n give an m by n table, and keeping only two rows cuts the space to O(min(m, n)).
Cost = number of states or operations times the cost of each.