data-structure tag

44 questions


1 answers
115 views
0
To enter and delete arbitrary values in a Java array...

public static int ListInsertDeletetCount(int []array){ int count = 0; Random rnd = new Random(); for(int i=0; i<100; i++){ int dst = rnd.nextInt(list.length-1); for(;;) { //Insert a dst number...

2 years ago

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
118 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

1 answers
112 views
0
I made a code for adding polynomials to the data structure, but the result is weird

I tried to add all three polynomials, but it was so difficult that I tried to squeeze them together by adding the first two equations and then adding the other one, but I didn't know what to do with t...

2 years ago

1 answers
86 views
0
Please help me with the c++ data structure (coding...

I saw the code in the C++ book and followed it. But I want to add and remove objects in this code. What should I do?I'm really a beginner.ㅠ

2 years ago

1 answers
115 views
0
I've never seen an exception error before How should I fix it?

It's a program that receives a median expression, changes it to a posterior expression, and then calculates itIf the number divided by 0 is an exception, we put an exception codeThe code error is Exce...

2 years ago

1 answers
71 views
0
I'd like to ask you about the time complexity of data structure

In an algorithm with time complexity of O(n2), if the number of inputs has doubled, what trend does the execution time increase?2)'s From this (2n)2 = 4n2 22Is this four times the answer? I keep getti...


1 answers
132 views
0
Curious about memory structure among gdb (code area or data area)

Code with an if statement.I thought that 0xdeadbeef was a constant that shouldn't be changed, so I thought it would be in the data area.But when I tried gdb,The assembly code is in the code area, righ...

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
« - 4 - »

© 2024 OneMinuteCode. All rights reserved.