bp interview question

How can you design a proper queue algorithm.