Skip to main content
Filter by
Sorted by
Tagged with
1 vote
3 answers
113 views

I was watching a youtube video on doubly linked lists in C. One of the functions made for the doubly linked list was an "insert_after_node" function, which as the name suggests inserts a new ...
Samo's user avatar
  • 11
-2 votes
1 answer
55 views

I am trying to print the contents of a Doubly Linked list using the str method by converting the content into string. The problem I face is that it returns the memory location of the values, not the ...
Rigo Estrada's user avatar
1 vote
2 answers
92 views

Now I have created a loop to make 25 nodes for the doubly linked list. By Initializing head pointer as NULL in the main function, now the forward_traversing and show_first functions do work as ...
Moonwalker's user avatar
0 votes
1 answer
110 views

I have this homework where I need to create a doubly circular linked list for a Music Player UI. I wrote the addFirst method and it works fine but when I create the addLast method I seem to not be ...
Nilüfer Sevde Özdemir's user avatar
2 votes
3 answers
159 views

I have written a code on deleting a node by comparing its data from the data given. If equal, it deletes the node. My problem is that my code will delete every node in the list except the last node, I ...
user avatar
0 votes
0 answers
98 views

The statements for my questions are: Write a program to determine whether a linked list is a palindrome or not. **Input Format: ** The first line contains integers separated by spaces representing the ...
Mridul Hemrajani's user avatar
0 votes
1 answer
188 views

I wrote this code where you can add or remove numbers from a list, and then display the list. The problem is: it displays the numbers in reverse order, except for the first added number. program ...
Adriana's user avatar
0 votes
1 answer
86 views

I have the following implementation for a Doubly Linked List -> struct Node<T> { value: T, next: Option<Rc<RefCell<Node<T>>>>, prev: Option<Weak<...
KillerFC's user avatar
0 votes
1 answer
266 views

I created a simple Doubly Linked List, with an append method and a str() that is supposed to return the elements present in the list. Here is the code; class Node: def __init__(self,val): ...
NK Rao's user avatar
  • 53
-3 votes
1 answer
94 views

I am a freshman in IT and we did a quiz about linked lists and one of the questions was: Linked List. Show the resulting list (redraw) after the following statements are executed. So we have a doubly ...
Yoo's user avatar
  • 1
-1 votes
1 answer
74 views

I am trying to import a book by prompting the user to provide its details in the command line one after another. For that I am using an overloaded input operator but when trying it out it results in a ...
Alexander Hunger's user avatar
0 votes
1 answer
141 views

I made a program to insert a element in doubly linked list given below(ignore create and display functions Which was working perfectly right till it found the index to be inserted is 5 ,where it fails ...
Harshal Malani's user avatar
0 votes
1 answer
120 views

This code aims to create a hospital data management application using doubly linked circular lists. It can be divided into two main parts: Classes: The Patient, Medicine, Doctor, and Disease classes ...
Meral Hamarat's user avatar
0 votes
1 answer
329 views

I'm constructing a "scenegraph", which is a hierarchical data structure of Shape nodes (e.g. sphere, cube, mesh, etc. not shown in example code). A Shape can own zero or more child Shape ...
davidA's user avatar
  • 13.9k
0 votes
1 answer
39 views

I am making a project right now to practice double linked lists and I have been working on a method in my double linked lists class which switches node locations. It works fine when trying to switch ...
TylerDr16's user avatar
1 vote
2 answers
62 views

I am learning linked list and I'm creating doubly linked list. My print backward is not working as intended. For better Information I will highlight the print backward function. Print Backward class ...
user avatar
2 votes
1 answer
280 views

So, as a hundreds of thousands of people before me, I am implementing a doubly linked list in С++. Here's a Node and List struct: struct Node { std::shared_ptr<Node> prev, next; int data;...
lian's user avatar
  • 543
1 vote
0 answers
91 views

I created two dictionaries, one using doubly linked lists and another using binary search trees, both with some basic functions. I want to estimate the Big O notation for both dictionaries and compare ...
Stats...'s user avatar
0 votes
0 answers
54 views

I have an assignment in which I have to implement a doubly linked list ADT. I do not have issues with that, I created something like this: class DoublyLinkedList{ struct Node{ int value; ...
Thalia's user avatar
  • 27
2 votes
1 answer
87 views

We have a circular doubly linked list with several elements. Every element has a link to the next element, a link to the previous element and a boolean value (true or false). Four operations are ...
KasimKas's user avatar
-2 votes
1 answer
75 views

I'm creating a toString() function that should return a String created by concatenating each Nodes toString(). A single space: ‘ ’ should be inserted between each Nodes toString(). No trailing space ...
softloftmaria's user avatar
1 vote
2 answers
58 views

I am trying to create a doubly linked list in java and just need a little guidance as too where I am going wrong.I also wanted to be able to set a capacity for the list as well. This is what I have so ...
Kareem Tiwari's user avatar
-1 votes
1 answer
58 views

I'm trying to improve my double linked list API. int ll_create(linked_list_p list, void (*print_data)(uint8_t)) { if (list == NULL) { list = calloc(1, sizeof(linked_list_p)); ...
Toideki's user avatar
-1 votes
1 answer
77 views

I have created a python class for doubly linked list. It looks like this: from tabulate import tabulate class Node: def __init__(self, value): self.data = value self.next = None # ...
Debaditya Nath's user avatar
1 vote
1 answer
50 views

All my other functions of my doubly linked list which consist of Account class and Node class are all working except this last function. The function bool deleteAcc(string name) will take as it’s ...
Jac Investigator's user avatar

1
2 3 4 5
37