Revision: 54403
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 22, 2011 09:07 by lubanozic
Initial Code
struct qu { tpacijent podaci[10000]; int front, rear; }; typedef struct qu queue; int AddOne(int n) { return((n+1)%10000); } tpacijent FrontQ(queue* Q) { tpacijent prvi; prvi = Q->podaci[Q->front]; return prvi; } void EnQueueQ (tpacijent x, queue* Q) { Q->rear=AddOne(Q->rear); Q->podaci[Q->rear] = x; } void DeQueueQ(queue* Q){ Q->front = AddOne(Q->front); } queue* InitQ(queue* Q){ Q = new queue; Q->front = 0; Q->rear = 9999; return Q; } bool IsEmptyQ(queue* Q){ if(AddOne(Q->rear) == Q->front) return true; return false; }
Initial URL
Initial Description
Implementacija reda pomoću polja
Initial Title
Implementacija reda pomoću polja
Initial Tags
Initial Language
C++