grep
— search text by patternawk
— process text by fields and rulessed
— edit text streamsfind
— locate files and directoriesxargs
— build and run commands from input
Complexity | Runtime Behavior |
---|---|
𝑂(1) | Constant time — work does not grow with input size. |
𝑂(log 𝑛) | Logarithmic time — input size reduced at each step. |
𝑂(𝑛) | Linear time — processes each element once. |
𝑂(𝑛 log 𝑛) | Linearithmic time — divides input and processes each part. |
𝑂(𝑛²) | Quadratic time — nested loops over the input. |
𝑂(𝑛³) | Cubic time — triple nested loops. |
𝑂(2ⁿ) | Exponential time — doubles work for each added element. |
𝑂(𝑛!) | Factorial time — generates all permutations. |