Add alternative algorithms for RMQ and LCA