Algorithm To Insert An Element Into Queue Vs Priority