2022 Developer Survey is open! Take survey.

All Questions

Filter by
Sorted by
Tagged with
18 votes
3 answers

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 ...
user avatar
  • 281