Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
1 answer
59 views

I am learning about queue data structure in python. I learnt the implementation of a queue using list in python and the issue of memory wastage when we dequeue a few elements from the front. We use a ...
0 votes
1 answer
83 views

I use two mutexes for enqueueTS() and dequeueTS(), so that writer and reader threads can run simultaneously without waiting for each other. However, both enqueueTS() and dequeueTS() can affect member ...
1 vote
0 answers
106 views

I have implemented a circular queue using an array in C++. The queue uses two atomic variables, front and rear, to manage enqueue and dequeue operations. When an element is enqueued, rear is ...
2 votes
1 answer
512 views

I have to implement a queue using a circular array and am having difficulty. This is what should happen: The enqueue() function returns a bool value: true if the queue is non-full prior to enqueuing ...
0 votes
1 answer
104 views

In the 2.2.2 sequential allocation section, TAOCP volume 1 , Donald Knuth mentions that F = R = 0 is for the two cases (4) and (5) of the circular queue, but if we use (6a) and (7a), we should set F =...
1 vote
1 answer
121 views

I'm working on a C program that implements a queue, and I'm encountering an issue with an infinite loop. The program is supposed to perform insertion, traversal, and deletion operations on the queue. ...
1 vote
1 answer
98 views

LinkSort.adb file with Ada.Text_IO; use Ada.Text_IO; procedure LinkSort is type JobType is (Accountant, Analysist, Manager, Manufacturing, Programmer, Inventory, Sales, SoftwareEnginner); ...
0 votes
0 answers
72 views

In fact, this is not a main problem, I encountered this issue while doing practice about BST traversal with circular-queue. I tried to define inorder traversal recursively and so enqueue-ing data also ...
-1 votes
1 answer
41 views

/* Queue structure which holds all necessary data */ typedef struct queue { int head; int tail; void** vals; int len; int count; } queue_t; /* creates a new queue with a given ...
1 vote
0 answers
189 views

This is a function for doubling the circular queue capacity in C (https://i.sstatic.net/xxhah.jpg) Code source : Fundamentals of data structures in C #include <stdio.h> #include <stdlib.h> ...
0 votes
0 answers
325 views

So I have to implement a circular queue using array and I've used the following code to do so. However, for some reason when I try to add the 5th element to my queue, it does not seem to work. ALso, ...
0 votes
0 answers
99 views

Circular Queue in C Currently working on a code that gives us an integer value (1,2,3) along side with a datatype either integer/char/string. Here, 1 -> Enqueue 2 -> Dequeue 3 -> Display For ...
0 votes
1 answer
190 views

front and rear pointers of circular queue are exceeding the size of array which can be seen in the print statement the input given for size was 3 where pointers go till the value 4 and 6.It would be ...
0 votes
1 answer
549 views

I was going through a book on Data Structures and Algorithm with JavaScript when I found this piece of codes. I need someone to help me explain the logic behind the code here, also the logic behind ...
0 votes
0 answers
357 views

So, i tried to delete a particular element in a circular queue, and used its index as front and back. When I ran the code: #include<stdio.h> #include<conio.h> #include<stdlib.h> #...

15 30 50 per page
1
2 3

AltStyle によって変換されたページ (->オリジナル) /