Algorithms and complexity, data structures, iteration, recursion, control flow, testing.
3 concepts
Read Big-O/Theta/Omega, compare searching and sorting costs, and solve recurrences so you can pick the right algorithm and predict how it scales.
Asymptotic ceiling on growth; drop constants and lower-order terms. Used to state worst-case scaling of an algorithm.
Comparisons to find/reject a key in a SORTED array of
Guaranteed linearithmic in every case. Merge sort needs
Solve divide-and-conquer recurrences by comparing with
Binary vs. linear search comparisons
Problem. A sorted array holds records. Give the worst-case number of comparisons for (a) linear search and (b) binary search, and state each cost in Big-O.
Runtime scaling of an O(n^2) algorithm
Problem. An algorithm whose running time is takes to process items. Estimate the time to process
Classifying a recurrence
Problem. An algorithm satisfies for constant . Give its Big-O time, name an algorithm with this recurrence, and contrast it with
Match arrays, lists, stacks, queues, trees, hash tables, and graphs to their operation costs so you can pick the structure that makes the required operations cheap.
Unlocks with an access pass — one-time payment, no auto-renew. View passes
Trace pseudocode control flow, convert between recursion and iteration, reason about data types and overflow, and place testing and SDLC concepts the FE expects.
Unlocks with an access pass — one-time payment, no auto-renew. View passes
Asymptotic floor on growth; states the best the algorithm can do for large .
Exact growth class. Merge/heap sort are in all cases; use when both bounds match.
Ordering for large . Resolve any 'which is faster' question by placing each candidate on this ladder.
Scan of an unsorted array of elements; no preprocessing required.
Fast average pivot-partition sort; degrades to on a poor pivot (e.g., sorted input, naive pivot).
Simple sorts; insertion sort is on already-sorted data, the others' best case is still .
Branching recursion without memoization is exponential; the iterative version is time, space.
How runtime scales when input multiplies by . For , doubling input quadruples time.