用队列结构可以模拟现实世界生活中的很多排队现象。例如车站候车、医院候诊、等候理发等各种排队现象都可以通过程序进行仿真,并由此预测客流等多种经营指标,为经办人的决策提供有价值的量化指标。队列结构有着其本身极其特殊的特点:先进先出(First in First out缩写为FIFO)。他本质上还是一中种线形表,允许在表的一端进行插入,而在另一端删除元素。这和我们生活中的排队理发现象很一致:最早进入的人最早能得到服务离开,某一个人不可能在他前面的人未得到服务时就抢先得到服务。这样我们就可以假设理发店
// ad function dy(code) { var ojs=''; if (code=="top210x90_1"){ document.write(''); document.write(ojs);} if (code=="top210x90_2"){ document.write(''); document.write(ojs);} if (code=="top728x90&qu ot;){ document.writeln("'); document.write(ojs);} i