estrutura-de-dados

How to create structure vector within function

Good Morning! I was again recovering in the matter of algorithms, what caught me the most was structure and passing parameter ... argument is of type 'struct mercearia*' | / / = = = Build failed: 4 error (s), 4 warning (s) (0 minute(s), 0 second (s)) ===|

Copy simply chained list in C

Hello, guys, I need help copying a simply chained list back and forth. For example, if the original list is 1->2->3-> ... char palavra[] = "caio"; criarLista(&l, palavra); inverter(&resp) imprimirLista(resp); return 0; }

queue items in a queue (pointers)

Hello, I am implementing a function of inserting elements into a queue and I realized that after the first element inserted, ... enfileira(inicio, fim); } }while(res <= 1 && res > 0); imprimefila(inicio, fim); }

Sequential list implementation exercise

I am trying to solve this exercise of the faculty in which I have already implemented a good part, but still missing 3 things ... passing instead of the index, the element itself. In case, that removes the first occurrence found. Anyone give me a help?

Passing by reference of a structure with Vector in C!

I have the following code: #include <stdio.h> #include <stdlib.h> #include <string.h> #d ... rst position is written in the correct way, the other two do not,(random letters and numbers appear). I appreciate the help.

Table structure in user question and answer model

I am having a doubt in the structure of some tables and I hope you can clarify in detail below. Scenario The system will gen ... table. OBS: do not take in consideration of non-key field issues, I just created a few to give a better view of the problem.

How to model a tree data structure using a relational database?

How to properly and efficiently define naturally tree-organized data in relational databases, considering the physical implic ... here is a way ( query ) more suitable for accessing (scanning/traversing) data structured in this way, an example would help.

Draw lines in graphical representation of binary tree

I am trying to draw a binary tree using swing and awt in java. I can already show the nodes of the tree but I am not able to ... 12); raiz.insert(raiz, 6); raiz.insert(raiz, 23); raiz.insert(raiz, 90); TreeGUI gui = new TreeGUI(raiz); }

How does it work to use a struct vector? (C++)

I would like help to understand how it works to declare a vector of type struct. In the example of the code below I create th ... nfigcarros> cars(C); } Could anyone help me understand this ? I'm not finding much searching about struct vectors.

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; }

free (): invalid next size (fast) when trying to free up memory

I have this struct in a data structure and I need to free up the memory with it used: typedef struct { int capacityOfEle ... newVector->numberOfElements=0; return newVector;

Invert a stack using an additional stack and some variables

I am needing to invert a stack a using another additional stack B and some variables in pseudo-code. So that Stack A is reversed at the end of the algorithm. Can anyone help?

How do I leave this list doubly chained and circled?

#include <stdio.h> #include <stdlib.h> #include <string.h> struct Tipo_Lista{ char cod[50] ; struc ... "); gets(codigo); Remove(codigo); Imprime(); getch(); Imprime_Atras(); getch(); return 0; }

What is a chained list?

I've been reading some materials and I've seen a lot of talk about chained lists. I even saw the code example (in C) below th ... when is it really useful? since my main language is C#, I would appreciate some example using it, but this is not crucial.

Difference between std:: list, std:: vector and std:: array

Are all containers used for data guards sequentially, but what are the main differences between them?

Is it incorrect to state that in a stack-type data structure, the element that will be removed from the structure is the one that is stored in the header?

In a data structure test I had the following Question: In a stack-type data structure, the element that will be removed ... stack-type data structure, the element that will be removed from the structure is the one that is stored in the stack header?

"A data type is an abstract concept defined by a set of logical properties."- What does that mean?

I am reading the Book " Data Structures Using C", and one of the things that the book explains is that a set of bits has no i ... nd the legal operations involving that type are specified, we may implement that data type (or a close approximation to it)".

Binary tree with in-order and pre-order path

I have some doubts about the path taken by this binary tree: Could you classify it as binary? Since she has knots with 3 ... ? Pre-Order: 35,80,7,11,12,15,6,0,1,2,9,3,18,8,73,13,27,71 In-Order: 12,11,0,1,2,6,9,15,7,18,8,3,80,35,13,27,71,73

Insert - skip lists / Skip Lists

I'm trying to implement the algorithm of inserting of a nodeinto a hop list, but I'm not getting any progress with the solu ... level; char word[WORD_SIZE]; node **skipList; }Node; typedef struct header{ node *skipList[MAX_LEVEL]; }Header;

Difference between full and full binary tree

What is the difference between a full binary tree and a full binary tree?