C/C++:順序表實現隊列的定義和基本操做

  隊列是一種先進先出的數據結構 ,不少場景下都有應用,如下爲源代碼:c++ #include <stdio.h> #include <malloc.h> typedef struct LNode* Queue; typedef char QueueData; struct LNode { //隊列結構體,數據從隊列頭進入,從隊列尾出去 QueueData *data; int head;
相關文章
相關標籤/搜索