0

I need to compute the big O of my algorithm.

It is contained from two nested for, each of them have binary search tree. the complexity of binary search tree is O(log n)

How can i compute the right complexity of my algorithm ?

Does it O(log(n)log(m)) or O(log(nm)) ?

Roka
  • 9
  • 1
  • Does this answer your question? [Big O, how do you calculate/approximate it?](https://stackoverflow.com/questions/3255/big-o-how-do-you-calculate-approximate-it) – Chris Apr 21 '22 at 21:55
  • 1
    *"the complexity of binary search tree is O(log n)"*: No, a binary search tree is a *data structure*, not an *algorithm*. Algorithms have a time complexity, data structures do not. Without seeing your algorithm in at least a formal language, it is not possible to answer your question. – trincot Apr 25 '22 at 07:21

0 Answers0