add ordered queue without order algorithm