Wet2 | ||
Dry2 | ||
Wet1 | ||
What is the complexity for NumInRange ? | |
In NumInRange function the complexity stands for r consecutive calls of NumInRange, a call for any other function will "break" the sequence of consecutive calls, and will "reset" the complexity. The complexity for r consecutive calls of NumInRange will take O( m+ |k| + r), as defined. |