📄️Time and Space Complexity
Complexity describes how the running time (or memory) of an algorithm grows with the input size n. We use Big-O notation to describe the upper bound while ignoring constants.
📄️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
Stack (LIFO)
📄️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
Binary search
📄️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.