Tags "linked-list" Result

Double Linked List

//I have a single linked list that looks like this node head = new Node (); head.info = 3; head.next = new Node (); head.next.info = 6 (); head.next.next = new Node (); head.next.next.info = 9; head.next.next.next = null; //How would I write a double linked list? class Double Node { info; doubleNode prev; doubleNode next; } Soluti

it1352 0 2020-10-26

Linked list within a linked list

Hello, Im sorry if this question has been asked before, but I did search before posting and couldnt find an answer to my problem. I have two classes each with corresponding linked lists, list1 and list2, each node within list1 has various data and needs to have a pointer to the corresponding node in list2, but I cant figure out how to do this. C

it1352 1 2019-06-27

linked list

I was doing one of the question but my program was not working properly. Can anyone help me with it pliz........ Here is the question for the program Question. Part 1. Add the function splitAt to split a linked list at a node whose Data is given. Suppose you have a list with the elements 10 18 34 6 28 92 56 48 and the list is to be split at th

it1352 1 2019-06-25

Singly linked list to doubly linked list

A friend of mine wants me to convert his code into a doubly linked list, though I'm not familiar with it at all. I've looked up doubly linked lists but I can't tell by his code what to do with it. I'm not a master programmer. Do you have any suggestions? import java.util.Collection; import java.util.List; class SinglyLinkedList<E> implem

it1352 3 2019-05-22

Converting a Single Linked List to a Double Linked List

I have here a single linked list for a program that makes a collage. This runs perfectly but I was wondering how to make it a double linked list. I really have no idea what a double linked is though or how to create one. Any help would be appreciated... There are 3 classes. class LinearCollage { private Picture myArray[]; private cla

it1352 0 2020-10-26

Accessing an element within my custom linked list class

I'm building my own linked list class and I'm having some issues figuring out how to write some functions to help me traverse this list. This is my first time building a linked list from scratch, so if my approach is unconventional please let me know what might be more conventional. I'd like write a function, within the List class that allows me t

it1352 0 2019-05-13

How to implement doubly linked list in swift?

How can I implement a doubly linked list in Swift with all the operations like insert and deletion? I know how to implement singly linked list but I can't find a way to make it a doubly linked list. I am a beginner in coding. import UIKit struct LinkedList<Value> { var Head : node<Value>? var Tail : node<Value>? v

it1352 0 2020-10-26

How to use a linked list with a header file in C?

I have to create a program that performs various functions with a linked list. I must save the functions in a separate file from the main() but then I can't figure out how to include the list in the header file. I tried different combinations and right now I have this in the linkedList.h file: typedef struct list_elements* item; And this in the

it1352 0 2020-10-26