очередь

Time Limit Exceeded in a Python queue task

Python Queue task We asked a laboratory at the institute for writing a queue in python, I solved the problem, uploaded it to ... thub.com/RoyalGoose/testrepos What could be the problem? How can I fix the code so that it runs faster and passes this test?

Queuing processes - java

I need to do it in java, so that I can put processes in a queue and they are executed in turn. Tipo: One process monitors th ... } catch (IOException e) { e.printStackTrace(); } } })); }

Create a priority queue (each item has its own priority)

Hello! There is a task: create a queue with a priority (each element has its own priority). The items with the highest priori ... peq->next=el; peq=el; } else { peq=el; pbq=el; }; }

Please help me fix the Python code

Hello everyone! For a long time I tried to solve one problem. The drunkard game Condition: In the drunkard game, a deck of c ... econd += [a, b] if n == 1000000: print('botva') break else: print('first' if first else 'second', n)

What are stacks and queues? [closed]

Closed. This question should be specified . Answers to it are not accepted at the moment. ... I am studying in the second year, programming, C++. Please tell us about stacks. How is the program written?

How to make a pass through the ring queue correctly?

How do I make a pass through the queue to display the information of this queue? You can't just run through the array from ... ients[i].GetNameClient+#10#13; result:=result+Clients[i].FullInfoOperationsWithDeposits+#10#13; end else end; end; end;

Help us understand the difference between queues and stacks

I don't understand the topic of stack queues and variants from implementations. The extract from what I managed to dig up in ... sm solve? Here I got a little confused, help me figure out what is needed for what, and what implementations it has. Thanks.

Blocking Queue and Multiple Consumers

Faced with the problem of implementing the Consumer/Producer pattern with multiple Consumers; I would like to implement the a ... f the principles of working with threads, since the Producer must get data from somewhere. I can't think of an entry point.

Queue in Python 3 threads

Studying multithreading, I wrote a small code that, in theory, should run threads in turn, I wrote a small script like this: ... just take it to run, then nothing happens, only a message that the thread is running. Can you tell me where I make a mistake?