Why should an SDET understand time and space complexity?
Answer
Complexity explains how an algorithm or test utility grows as input size increases. It helps an SDET spot quadratic data setup, slow log processing, expensive polling and memory-heavy fixtures before they make suites unusable. State the dominant time and space costs, test representative scale, and remember that Big O does not replace measurement of constants, I/O and real bottlenecks.
Strong answer includes
- connects asymptotic growth to test-suite maintainability
- considers both time and auxiliary space
- combines analysis with measurement
Practical example
A test-data setup helper that does a linear scan to check for duplicates inside a loop that inserts N records turns an O(n) seed script into an accidental O(n squared) one; nobody notices at 100 records, but the nightly suite that seeds 50,000 records starts timing out and nobody can explain why until someone profiles it.