Top "Singly-linked-list" questions

A linked list in which each node only points to the next node in the list, as opposed to a doubly-linked list in which each node points to both the next and the previous nodes.

Swap nodes in a singly-linked list

I am trying to swap two nodes. For example if the nodes are a and b I am passing the …

c pointers swap singly-linked-list
how to remove a object from linked list in java?

i have one problem with my code ,i did a sample program to display the emp details from a linked …

java data-structures linked-list singly-linked-list
Is there a linked list predefined library in Python?

I know in c++ it already exist #include <list> Now I am curious to know if it exist …

python linked-list singly-linked-list
Why is deleting in a single linked list O(1)?

I do not quiet understand why deleting at the end of a single linked list goes in O(1) time, as …

data-structures linked-list singly-linked-list
How to read a singly linked list backwards?

One method which I can think of is to reverse the list and then read it. But this involves changing …

c# singly-linked-list
strategies to reverse a linked list in JavaScript

I just struggled through a simple interview question: Please reverse a singly linked list. While I failed to provide a …

javascript linked-list singly-linked-list
How can I reverse a linked list?

Consider: Node reverse(Node head) { Node previous = null; Node current = head; Node forward; while (current != null) { forward = current.next; current.…

java algorithm data-structures linked-list singly-linked-list
Inserting Node into middle of Linked List, and accidentally inserting null node as well

I'm working on a program that does not use Java's built in Linked List class; I'm building it from scratch. …

java singly-linked-list
Insertion sort on linked list in C?

I've tried searching for a problem similar to mine, but haven't found much help. I have a linked list of …

c linked-list singly-linked-list insertion-sort