fila

Queue implementation in ANSI C

I have a code (end of question) that allows manipulation of a queue in ANSI C, my question is as follows: the code declares a ... ont(Q)); Enqueue(Q,5); Dequeue(Q); Enqueue(Q,6); printf("Front element is %d\n",front(Q)); }

Problem inserting elements into a queue

I made a function using the concept of static queue to insert an element, however, it is not executing when I call it in main ... free_queue(&q); break; }; system("pause"); } return 0; } Hope you can help!

C++: Data Structure / queue

I made a data structure algorithm. I put all my knowledge into it. I can't find the error. I leave the statement of the exerc ... cout << "Numero mulitplo de 3 e 5!" << endl << endl; } cont++; }while(cont < 20); return 0; }

Priority queue implementation using vector

I am implementing a priority queue through a vector, my method for insertion works normally: public boolean inserir(int n){ ... should I do to rearrange the vector so that it is possible to insert it after having removed the first element of the queue?

Program C queue and stack

I created a program in C, to remove (or copy) the values of a queue, using the output rules of a stack and add them in a new ... ha.ini]=fila.dados[pilha.fim]; pilha.fim--; pilha.ini++; } } while (pilha.fim==0); }

How to implement a queue using two stacks

Hello, I need to implement a queue using two stacks, i.e. I need to insert an integer into Stack 1, and when I am removing an ... ->prox; free(aux); } return Topo; } Elemento* Top(Elemento *Topo){ return Topo; } What should I do?

Data structure, Circular queue. Questions about unrolling and queuing methods

I am not being able to understand the two blocks else in the methods Desenfileirar and Enfileirar. More specifically the line ... aux].getChave()+" "; aux = (++aux % this.info.length); } return msg; } }

Creates queue as if it were from a bank (with preferential)

I need to create a program that simulates the registration of people in a hospital queue, obeying the order that it is always ... nt dictionaries and know which one to call? (there is a dictionary for the common queue and another for the preferred queue)

How to interleave the values of two rows in C, in a third row?

I am trying to interleave the values of two rows in C, f1 and f2, in a third row, Inter, as function below (n would be the am ... rleave the values of both rows without getting values from memory, or else without omitting values from f1 or f2? Thank you!

Is there a need to do something to ensure delivery to queue (SQS) on AWS?

Assuming I have 2 microservices "A" and "B"that are communicating via an SQS queue "F". The microservice " a "can fall," B ... t rely on SQS availability and track in case something is not shipped instead of doing something to "secure delivery" to "F"?

Insert at the beginning of a circular queue

I am working on a circular queue program where I want to implement a "paste queue" function, where the user inserts a number ... >fim; F->memo[F->fim] = x; F->com = aux2; F->fim = aux-1; F->total++; } Any suggestions?