cpp-libface
cpp-libface copied to clipboard
Make Segment Tree's query_max() singly recursive instead of doubly recursive
This might help reduce the running time. Might result in a constant factor improvement, but nothing asymptotically.
Alternatively, use an explicit stack instead of the system stack, since it can be faster.