Problem I solved this problem in C++. I was having trouble though understanding what return headA; and return headB; returns […]
Tag: linked-list
Return Kth to Last: Implement an algorithm to find the kth to last element of a singly linked list
Problem Implement an algorithm to find the kth to last element of a singly linked list. Any comments or feedback […]
Find union and intersection of linked list
Problem Find the union and intersection of linked list, given that elements don’t repeat in a single linked list. This […]
Ruby: Remove middle node from Linked List
Problem Currently, I’m going over the CTCI, I’m working on the problem removing the middle node. I’m using Ruby to […]
Initializing values of a singly linked list with a constructor [closed]
Problem Closed. This question is off-topic. It is not currently accepting answers. Questions containing broken code or asking for advice […]
Stack with getMin method
Problem This should implement a stack that has a
Specialized ConcurrentLinkedList
Problem I need a concurrent data structure with the following properties: Low overhead for enumeration Insert only at end. Removal […]
Barebones but Sequence compliant Singly Linked List
Problem I haven’t written a linked list from scratch in a couple years, so I decided to take a stab […]
Finding better logic for addition and removal of Nodes in a Linked List
Problem Consider the following piece of code I wrote (a templated Linked List): package com.data_structures; public class LinkedList<NodeDataType> { public […]
Flatten a multilevel linked list
Problem Given such a structure the output should be 10->5->12->7->11->4->20->13->17->6->2->16->9->8->3->19->15. Given a linked list where in addition to the next […]