Difference between “enqueue” and “dequeue”

前端 未结 6 1589
盖世英雄少女心
盖世英雄少女心 2021-01-30 13:26

Can somebody please explain the main differences? I don\'t have a clear knowledge about these functions in programming for any language.

6条回答
  •  执笔经年
    2021-01-30 13:31

    A queue is a certain 2-sided data structure. You can add new elements on one side, and remove elements from the other side (as opposed to a stack that has only one side). Enqueue means to add an element, dequeue to remove an element. Please have a look here.

提交回复
热议问题