queue tag

11 questions


1 answers
94 views
0
c Language Fibonacci sequence is queued (single link list)

#include < stdio.h>#include < stdlib.h>#define Q_SIZE 100typeef element; //int type is defined as the data type of the queue elementtypedef struct{element queue[Q_SIZE]; int front, rear; ...

2 years ago

1 answers
110 views
0
I have a question about the C language queue. (enqueue

#include <stdio.h>#include <stdlib.h>#include <string.h>#define MAX_SIZE 100#define DataType chartypedef struct ArrayQueue { int front; int rear; DataType queue[MAX_SIZE];} } ArrayQu...

2 years ago

1 answers
107 views
0
I have a question about the data structure queue!

public static void enQueue(int data){if(isFull()){ throw new QueueOverflowException(Queue Overflow); }else{ rear = (rear+1)%capacity; array[rear] = data; if(front == -1) front = rear; } }}If there ...

2 years ago

1 answers
84 views
0
IndexError

This is a programmers stack/queue issue. count = 0 for i in range(len(left_days)): largest = left_days[0] if(largest >= left_days[i]): count += 1 if(i==len(left_days)-1): answer.append(count)...

2 years ago

1 answers
140 views
0
Python Q question

How do I implement a function or method that allows me to specify the maximum size of the queue here?class MyQueue: def init(self, max_size): self.myList=[] self.max_size=max_size self.front=-1 se...

2 years ago

1 answers
136 views
0
Structure variable forward declaration, prototype declaration error

I wanted to use a queue with a Problem structure variable as a type, so I declared a variable, but there was an error, so I'm uploading a question.For example, if you have a structureProblem{};I want ...


1 answers
144 views
0
When the door turns weird, scanf

#include <stdio.h>#include <stdlib.h>#defineMAX_STACK_SIZE 100 // Declare Global Variableschar stack[MAX_STACK_SIZE];int top = -1; void stackFull() { fprintf(stderr, Stack is full, cannot...


1 answers
119 views
0
When I pop the stack code below, the value does not return properly.

#include <stdio.h>#include <stdlib.h>#define MAX_STACK_SIZE 5void stackFull() { fprintf(stderr, Stack is full, cannot add element); exit(1);}void stackEmpty() { fprintf(stderr, Stack is Em...

2 years ago

2 answers
84 views
0
Is the front and rear values in the circular queue promised to be initialized to zero?

Hi, how are you?To me, hash code masters like professors and teachersAs always, I'll ask shyly.Currently, I am studying with a book called Data Structure Written Easily in C Language by Chun In-guk.It...

2 years ago

1 answers
130 views
0
I followed the example of the circular cue in the book, and there are errors depending on the size of the array. Help me.

Hello.I am currently reading a book called Easy Data Structure in C Language by Chun In-guk.I always think it's better to move the example yourself and carefully examine how it works and implement it ...

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.