#include int insert_in_Q(int[],int); void display(int[],int,int); const int size = 50; int Q[size], front=-1, rear=-1; SARAS M SRIVASTAVA, PGT (CS), KV, IISC, BANGALORE - 12 49 Implementation of the Algorithm in Program: int insert_in_Q(int Q[ ], int ele) { if (rear==size-1) return -1; else if (rear==-1) { front = rear = 0 ; Q[rear]=ele; } else { rear++; Q[rear]=ele; } return 0; }
{}