Most voted "chain-list" questions
A chained list is a representation of a sequence of objects in computer memory. Each element of the sequence is stored in a list cell: the first element in the first cell, the second in the second and so on.
Learn more…190 questions
Sort by count of
-
0
votes1
answer544
viewsSimple Chained List
I’m having trouble removing an item at the end of the list Defining the knot: class Node { Node proximo; int chave; Node(int chave) { this.chave = chave; } } Simple Chained List: class ListaLigada {…
-
0
votes1
answer1232
viewsHow to create a Chained and Double Chained List?
Can be in languages: C, Java, Javascript and Python. I’m trying to create a Chained List and a Double Chained Movie theme. I searched on the internet about the topics and arrived at this code:…
-
0
votes1
answer183
viewsProblem to add at the end of a Simple Chained List
I have a simple chained list and need to do a recursive function that adds at the end of the list an element, I already have the function without recursiveness, but the with recursiveness is giving…
-
0
votes1
answer71
viewsError Segmentation fault (core dumped) Circular double list
I’ve been trying to make a double circular list for hours. I’ve tried to fix all the bugs but got a 'Segmentation fault (core dumped) error that I have no idea what it is. Can someone please help…
-
0
votes1
answer101
viewsDynamic Chained List Creation
I am studying data structure by site: Uncomplicated C Language - Data Structure and in class 12 (3:52 min) the teacher develops the function that creates the list: // Implementação das funções…
-
0
votes0
answers40
viewsHow to insert a number into an arbitrary position, into a position I want?
Hello, all right? I have this code and I need to know how to insert a value in an arbitrary position, I tried in a few ways, but I couldn’t. Follows the code: #ifndef LIST_H #define LIST_H…
-
0
votes1
answer355
viewsFunctioning Chained List
I’m trying to implement a chained list scheme in Python and was debugging the code to better understand how it works. I’m curious about some things. The code I’m implementing is as follows:: class…
-
0
votes0
answers81
viewsFilter list of lists
Hello! You have to separate elements from a list of lists, without repeating them? Example: From the pre list, modifying the test condition to validate the combinations if their sum was a multiple…
chain-listasked 5 years, 8 months ago Jurandir Portela 21 -
0
votes1
answer33
viewsList code not compiling well
Hello. I’m trying to learn about pointers and lists and I made a code that contains a menu and the option to enter as many values as I want. I made the code in the most recent codeblocks using W10…
-
0
votes3
answers81
viewsHow do I resolve this error by trying to delete a specific node from a chained double list?
In my project, I am making a double-padlock list in C, where it has simple objectives, such as adding at the beginning or end, removing a specific or zeroing. I took a shallow code and was adding…
-
0
votes2
answers666
viewsSimple Java chained list position change
I have to create a method that changes position two elements into a simple chained list, but I’m having difficulties in creating this method. In this case the method receives two elements of the…
-
0
votes1
answer102
viewsRemove an element previous to the element specified by the user in a List. C
I have to create a program, which will create a dynamically double-chained list and this program should do the following: the program will read values that the user writes and add to the list. Then…
-
0
votes1
answer470
viewsQuicksort in double chained list
For a college task, I need to adapt the quicksort algorithm to a "time" object, which contains dozens of attributes such as stadium, name, nickname, date of foundation, etcs. Within main, a list of…
-
0
votes2
answers512
viewsChained List in C Language print inverse list
I need to create a list that gets n we and print these nodes normally and in reverse order, ie 1,2,3 to 3,2,1. I am new in programming area and would be very grateful for the help. I am using Dev…
-
0
votes0
answers30
views"Dereferencing NULL Pointer" error in a chained list structure
My code deals with a simple endadeada list (then I will implement the pointer to turn double). But in the line strcpy_s(new_element->musica_name, musica_name); He keeps giving an…
-
0
votes2
answers31
viewsError exited, Segmentation fault when adding a second element to my list
This error only occurs when I add a second element to my chained list, I know the problem is in the Else of the inse_contact function but I can’t identify it. #include <stdio.h>…
-
0
votes1
answer39
viewsDoubling element of a double chained list
I need to create a function that receives a Lita and duplicate all nodes on the list. then the list 1 2 3 4 would be 1 1 2 2 3 3 4. My attempt: void duplicaLista (struct tDescritor *lst){ struct tNo…
-
0
votes0
answers84
viewsHow to order a chained list in order of the code?
Good afternoon (or good evening) staff. I am with the faculty exercise of the theme "Simple Chained List", which I must sort increasing and decreasing by the serial number of the product. But I have…
-
0
votes1
answer81
viewsSimply Chained List - delete the first half of the list
Good afternoon, you guys. I hope I’m publishing it right, because I’m new to the forum and new to programming. So, on a question that I am, more specifically in "Simple Chained Lists", is that the…
-
0
votes1
answer49
viewsAdd nodes to the chained list using loop
I did not find any similar question, in case you have, please indicate and I delete the post. How to create a chained list so I can use a for loop to put the nodes in the list. I’m using two…
-
0
votes1
answer371
viewsHow to simulate Stack with chained list in C?
I’m trying to create a program that checks a certain sequence and returns whether it is well formed or poorly formed. I’d like to make the chained list behave like a pile, but I’m having trouble…
-
-1
votes1
answer215
viewsShuffle list in c++
I want to know how I can, given a list, shuffle the order of the elements in it. The type structure of the list I want to shuffle is as follows. struct exemplo { int I; int O; int V; struct exemplo…
-
-1
votes1
answer361
viewsFunction showing list in reverse order
def imprimeDeTrasParaFrente(lista): if lista == None : return imprimeDeTrasParaFrente(lista.proximo) print lista, class Node(object): def __init__(self, carga=None, proximo=None): self.carga = carga…
-
-1
votes2
answers377
viewsError to print a C name on the screen using chained list
I made this code with the purpose of asking for notes and names and then printing on the screen, but for some reason the name n is being shown the name q was typed. The code was made in C. {…
-
-1
votes1
answer55
viewsProblem with Double Chained List
My function - for now - can create a list and add items at the beginning or end of the list. But when calling the add item function, selecting 1 or 2, and entering the item, the program simply…
-
-1
votes2
answers60
viewsSimply Chained List in C - Do not compile correctly
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <locale.h> typedef struct nodo Nodo; struct nodo{ int valor; Nodo *proximo; }; void cria_lista(Nodo…
-
-1
votes2
answers654
viewsHow to remove last element from a chained list using position?
I am wanting to remove the last element from a chained list by typing position n: when I type 1,2,3,4,5 of and n=2, I want it to stay 1,2,3,5 but it’s giving 1,2,3. import java.io.IOException;…
-
-1
votes1
answer182
viewsInsert an item in the chained list
I am trying to insert a new element a chained list without head, I can even insert more when leaving the function the pointer points to null again void cadastrar_produto(char codProd[], char…
-
-1
votes1
answer93
viewsDelay in execution of code in C
Hello guys this is the first time I’m looking for help, well I’m a freshman in computer science and I’m having a hard time at a job where the teacher asked me to fix code for a random person in the…
-
-1
votes2
answers169
viewsFunction clone stack value
Hello, I have an activity that asks me some functions, among them a cloning functionValorPilha(struct no **Stack) (this form is mandatory), but whenever I try to compile what is written does not…
-
-1
votes1
answer35
viewsPure C chained list error
I am making a simple chained list where struct has only one 'given' integer variable, the user type the data to be inserted right into the menu and it is played in the function that adds a new…
-
-1
votes1
answer24
viewsFunction of concatenating two chained lists returning only one element
I have a function that receives as parameter two chained lists containing elements and a third empty list that at the end will be the junction of the two, but at the end of the execution of the…
-
-2
votes1
answer342
viewsHow do I print the data into a dynamically double-chained list in C?
Good afternoon, folks. This is my first question here on the site, so suggestions are welcome. I’m writing a code using Doubly Chained Dynamic List for the college’s Data Structure class and I’m…
-
-2
votes1
answer64
viewsDouble chained list in C using remove function
Could someone help me because I’m not getting the function of remove, I did everything right, but I’m not succeeding, need not give me the code, just could guide me what is wrong and how to solve. I…
-
-2
votes1
answer643
viewsHow to browse a java chained list
I need to go through a chained list to compare whether the number the user will enter is equal to an attribute of a class (doctors) that has a chained list. I have the following Classes: Node,…
-
-2
votes1
answer48
viewserror when registering a subject on a student’s list
I’m doing a school register where I create a double-chained circular list to insert students, and a simply chained list to insert a student’s discipline. In the part of enrolling student everything…
-
-2
votes1
answer74
viewsPython, how to invert a chained list?
Hello, I need to create a function that receives an unordered list in the structure of nodes and it should reverse the order of the elements of that list, I tried to make a L[::-1] to reverse the…
-
-2
votes1
answer95
viewsFunction that copies chained list in another chained list (excluding repeated elements) does not work
/* I need to create a function that copies a chained list passed as a parameter to another chained list (except repeated elements, if any). This is my current code #include <stdio.h> #include…
-
-4
votes1
answer45
viewsTransform a simply chained list code into a dual chained java list
I would like you to help me because I am not yet very familiar with double-chained lists.
-
-4
votes2
answers149
viewsString-populated chained list(Linked list)
Hello, I’m trying to create a list that is populated with strings but when I try to print it nothing appears. I appreciate any help available. #include <stdio.h> #include <stdlib.h>…