Fundamentals · Easy · Free
How do you communicate time/space complexity clearly in a live coding round?
FresherFundamentalsData Structures & Algorithms
Communicating complexity
- State time and auxiliary space after agreeing on n.
- Mention dominant term—drop constants and lower orders.
- Relate to constraints: n=10⁵ → need O(n log n) or O(n).
- Walk a tiny example while coding.
java
// After coding binary search:
// "n = array length, each step halves range → O(log n) time, O(1) extra space."Say complexity before interviewer asks—it shows confidence.