time complexity of subtraction of iterators

Revision en1, by unt311, 2021-06-22 11:03:34

I couldn't find relevant answers to this online.

If I do int pos = iterator1 - iterator2

would this be an O(n) or a O(1) operation.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English unt311 2021-06-22 11:03:34 183 Initial revision (published)