Common Time Complexities
Name | Running Time: T(n) | Example |
---|---|---|
Constant | O(1) | Finding the median value in a list of sorted numbers |
Logarithmic | O(log n) | Binary search |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.