Questions tagged [linear-complexity]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
18
votes
3answers
4k views

Time complexity $O(m+n)$ Vs $O(n)$

Consider this algorithm iterating over $2$ arrays $(A$ and $B)$ size of $ A = n$ size of $ B = m$ Please note that $m \leq n$ The algorithm is as follows ...