bp Interview Question

How can you design a proper queue algorithm.