add one RMQ algorithm