File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ Overall time is: **O(NlgN + Q)** to build the table and answer all queries.
279
279
The naive approach is to do a for loop for each query. The overall time for the naive approach is : ** O (NQ)** .
280
280
For very large ** Q** , the naive approach will scale poorly. For example if `Q = O (N* N)`
281
281
then the naive approach is `O (N* N* N)` where a Sparse Table takes time `O (N* N)`.
282
- - ** Space**- The number of possible ** w** is ** lgN** and the number of possible ** i ** our table is ** N** . So the table
282
+ - ** Space**- The number of possible ** w** is ** lgN** and the number of possible ** l ** our table is ** N** . So the table
283
283
has uses ** O (NlgN)** additional space.
284
284
285
285
### Comparison with Segment Trees
You can’t perform that action at this time.
0 commit comments