Questions tagged as 'lista-encadeada'

1
answer

How to block the insertion of an information using a List

Well I'm using list structure and I've tried everything and so far I have not been able to. I'm trying to get the product entity to ONLY receive the CPF from a vendor. The Product entity works when the Person entity has nothing inside or until I...
asked by 29.02.2016 / 00:47
1
answer

Doubts about list chained in C

Hello, I made a simple threaded list in C, with the insert start and insert functions at the end, how do I do the removal functions? #include <stdio.h> #include <stdlib.h> typedef struct no{ int num; struct no *prox; }No;...
asked by 26.05.2018 / 23:25
2
answers

Concatenating two linked lists in C

I'm starting my studies on dynamic structures in C and I'm having trouble making a code to concatenate two lists. The part of painting on the screen the contents of the lists is working, but at the time of concatenating it appears "Segmenta...
asked by 27.02.2018 / 03:57
1
answer

Java: Implementation of double-chained list (deque) with callback, generics, exception and lambda [closed]

I'm doing the implementation in java, however I have some problems with how to integrate generics and lambda in the deque: Deque.java : import java.util.ArrayList; public class Deque { private Element head; private Element tai...
asked by 19.06.2018 / 18:33
1
answer

Use ArrayList or LinkedList

The List interface has several implementations, including ArrayList and LinkedList . I usually use only ArrayList , but I would like to know in which scenarios it is recommended to use the LinkedList implementati...
asked by 05.11.2018 / 17:01
1
answer

Problem due to add at the end of a Simple Chained List

I have a simple linked list and need to do a recursive function that adds at the end of the list an element, I already have the function without recursion, but the one with recursion is giving error. Here is the code and error: Function with...
asked by 10.09.2018 / 19:11
1
answer

Convert function from recursive to iterative

I have a merge function of linked lists working. However, recursion is being used and I would like to change the code and make it iterative. But I did not succeed. Follow the code: struct Node { int data; struct Node *next; } struct No...
asked by 22.04.2018 / 03:57
1
answer

What is the function of this code snippet? Data structure (List)

I need to understand what each command is capable of doing, because it is without comments. struct Node{ int num; struct Node *prox; }; typedef struct Node node; int tam; int vazia(node *LISTA) { if(LISTA->prox == NULL)...
asked by 18.10.2017 / 16:54
1
answer

Error Segmentation fault (core dumped) Double circular list

I've been trying to make a Double Circular List for hours. I have tried to correct all the errors but it gave a error 'Segmentation fault (core dumped)' that I have no idea what it is. Can anyone help me please? Below is my code: //Arquivo...
asked by 17.10.2018 / 06:45
1
answer

Python function error ("is not defined")

This was the simplest code I found in a python-chained list, I just could not figure out why it's not working class NodoLista: #Esta classe representa um nodo de uma lista encadeada. def __init__(self, dado=0, proximo_nodo=None):...
asked by 29.11.2018 / 04:02