Skip to main content

Questions tagged [linked-list]

A linked list is a data structure in which the elements contain references to the next (and optionally the previous) element.

5 votes
4 answers
751 views

Reservation app in C with linked list, BST, and CSV

This is a reservations app with linked lists for insertion and BST for search. It uses CSV files for storage, recursion for printing and handles memory allocation for variable growth. I'm looking for ...
Attila Vajda's user avatar
1 vote
0 answers
28 views

IndexedLinkedList.java - A fast list data structure for large data, Take IV/V (inner classes)

Intro This post is the continuation of IndexedLinkedList.java - A fast list data structure for large data, Take III/V (private API). Code ...
coderodde's user avatar
  • 32k
1 vote
0 answers
30 views

IndexedLinkedList.java - A fast list data structure for large data, Take III/V (private API)

Intro This post is the continuation of IndexedLinkedList.java - A fast list data structure for large data, Take II/V (package private API). It presents the private methods only. Code ...
coderodde's user avatar
  • 32k
1 vote
0 answers
33 views

IndexedLinkedList.java - A fast list data structure for large data, Take II/V (package private API)

Intro This post is the continuation of the IndexedLinkedList series. It presents the package private API: Code ...
coderodde's user avatar
  • 32k
1 vote
1 answer
79 views

IndexedLinkedList.java - A fast list data structure for large data, Take I/V (public API)

Intro I have this Java implementation of a list data structure that outperforms on a benchmark even the Apache Commons Collection4 TreeList by a factor of 8. This ...
coderodde's user avatar
  • 32k
7 votes
7 answers
2k views

LinkedList data structure in C

Is my logic good? Are variable names fitting? Are there any memory leaks? Am I doing anything dangerous (this is C after all)? Please feel free to criticize the code. I want to know if I'm writing C ...
buzzbuzz20xx's user avatar
9 votes
4 answers
1k views

C++20 Singly Linked List with Iterator

Below is the code I wrote to implement a singly linked list. To keep things simple, I omitted things like copy constructor. Aside from general feedback, here are some specifics I would like addressed: ...
user1446642's user avatar
4 votes
3 answers
1k views

Java class subset of C++ std::list with efficient std::list::sort()

Issues with generics < E > and < E extends Comparable > in code below. What changes are needed in the code below to prevent DLList.push_front() and DLList.push_back() from accepting ...
rcgldr's user avatar
  • 376
5 votes
2 answers
244 views

Basic Linked List Implementation in JavaScript

Clarification of Intent Recursion here is used on purpose for practice - note that iteration is preferred in this case (I'll be more clear about where my intentions are!) Factory function was also ...
bdng's user avatar
  • 51
3 votes
1 answer
102 views

Simple Stack and Deque implementation (v2)

My previous post: Simple Stack and Deque implementation I have implemented 2 classes for my project similar to stack and deque. This is my second attempt to get advice and evaluation of my code. Maybe ...
vansergh's user avatar
  • 313
1 vote
1 answer
154 views

Simple Stack and Deque implementation

I implemented a single-linked and double-linked lists (like stack and deque). I would like to receive your feedback on improving the code or maybe some comments. I'm learning C++ for the third month. ...
vansergh's user avatar
  • 313
4 votes
3 answers
723 views

Error handling for singly linked list in C

I have seen many list implementations in C in this site; I know its been asked many times. I need some advice regarding: Quality of my code, especially my list library. How to handle errors in main (...
Sai_krishna's user avatar
9 votes
2 answers
1k views

C# Linked List implementation

I am trying to learn C# and created this project to improve. I will be using C# professionally so a harsh critique is welcome. ...
Doruk's user avatar
  • 423
2 votes
1 answer
79 views

Advent of Code 2022 Day 13 Solution in C: Sorting and parsing nested list

Link to Original Problem: Advent of Code 2022 Day 13 Question Summary: The task involves sorting and parsing nested lists, with two parts: Determine pairs in the correct order and calculate the sum ...
fish_brain's user avatar
3 votes
4 answers
759 views

Adding Node to Linked List

I've been programming for 3 months now, and I've just come across Linked List, and I'm not gonna lie, I've been struggling a little. I wrote this code to practice on Linked Lists. The purpose is to ...
fraber's user avatar
  • 189

15 30 50 per page
1
2 3 4 5
72