Time and Space Complexity
Complexity describes how the running time (or memory) of an algorithm grows with the input size n.
Arrays and Lists
An array stores elements in contiguous memory so any index can be reached in constant time. In Python the built-in list is a dynamic array.
Linked Lists
A linked list stores values in nodes; each node points to the next one. There is no random access, but insertion and deletion at a known node are O(1).
Stacks and Queues
Last in, first out. Use a Python list: append to push, pop to pop (both O(1)).
Hash Tables
A hash table maps keys to values using a hash function. Python's dict and set are hash tables with O(1) average insert, lookup and delete.
Searching and Sorting
Works on sorted data and halves the search space each step: O(log n).
Recursion and Backtracking
A recursive function solves a problem by calling itself on a smaller input. Every recursion needs a base case and progress towards it.