All Projects → steveklabnik → Indexlist

steveklabnik / Indexlist

indexlist: A doubly linked list, backed by a vector

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Indexlist

Java
Repository for Java codes and algos.Star the repo too.
Stars: ✭ 53 (-29.33%)
Mutual labels:  data-structures
Cs112 Rutgers
CS 112 Data Structures at Rutgers University
Stars: ✭ 61 (-18.67%)
Mutual labels:  data-structures
Console Based Projects C
All projects are console based💻 and developed using C📚.All projects are dynamic and developed with the concept of Advance data structure 📁(Dynamic memory allocation,Linkedlist,Stack,Queue,Tree)✏️
Stars: ✭ 67 (-10.67%)
Mutual labels:  data-structures
Dart Algorithms
Data structures and algorithms with Dart. Dart版本的数据结构与算法.
Stars: ✭ 53 (-29.33%)
Mutual labels:  data-structures
Kactl
KTH Algorithm Competition Template Library (... eller KTHs AC-tillverkande lapp)
Stars: ✭ 1,106 (+1374.67%)
Mutual labels:  data-structures
Dashmap
Blazing fast concurrent HashMap for Rust.
Stars: ✭ 1,128 (+1404%)
Mutual labels:  data-structures
Teaching Kids Programming
Teaching Kids Programming
Stars: ✭ 52 (-30.67%)
Mutual labels:  data-structures
Cyclops
An advanced, but easy to use, platform for writing functional applications in Java 8.
Stars: ✭ 1,180 (+1473.33%)
Mutual labels:  data-structures
Ki
Go language (golang) full strength tree structures (ki in Japanese)
Stars: ✭ 61 (-18.67%)
Mutual labels:  data-structures
Cs61b
Data Structures, Spring 2019
Stars: ✭ 67 (-10.67%)
Mutual labels:  data-structures
Interview Guide
Coding/technical interview guide: data structures, algorithms, complexity analyses, interview questions
Stars: ✭ 54 (-28%)
Mutual labels:  data-structures
Openrefine
OpenRefine is a free, open source power tool for working with messy data and improving it
Stars: ✭ 8,531 (+11274.67%)
Mutual labels:  data-structures
Buckets Js
A complete, fully tested and documented data structure library written in pure JavaScript.
Stars: ✭ 1,128 (+1404%)
Mutual labels:  data-structures
Geeksforgeeks Dsa 2
This repository contains all the assignments and practice questions solved during the Data Structures and Algorithms course in C++ taught by the Geeks For Geeks team.
Stars: ✭ 53 (-29.33%)
Mutual labels:  data-structures
Coding Ninjas Data Structures And Algorithms In Python
Solved problems and assignments of DSA course taught by Coding Ninjas team
Stars: ✭ 70 (-6.67%)
Mutual labels:  data-structures
Dlist
Difference lists in Haskell
Stars: ✭ 52 (-30.67%)
Mutual labels:  data-structures
Complete Placement Preparation
This repository consists of all the material required for cracking the coding rounds and technical interviews during placements.
Stars: ✭ 1,114 (+1385.33%)
Mutual labels:  data-structures
Coursera Specializations
Solutions to assignments of Coursera Specializations - Deep learning, Machine learning, Algorithms & Data Structures, Image Processing and Python For Everybody
Stars: ✭ 72 (-4%)
Mutual labels:  data-structures
Algorithm
📌 Notes and Codes for studying data structures and algorithm
Stars: ✭ 71 (-5.33%)
Mutual labels:  data-structures
Ctci 6th Edition
Cracking the Coding Interview 6th Ed. Solutions
Stars: ✭ 9,328 (+12337.33%)
Mutual labels:  data-structures

indexlist - A doubly linked list, backed by a vector.

Build Status Build status

This crate provides a struct, IndexList<T>, which is a doubly-linked list. However, unlike a traditional linked list, which heap allocates each of its nodes individually, all nodes are stored in a vector. Rather than provide pointers to nodes, an Index struct can be used to access a particular element in the middle of the list.

Safety

This crate uses #![deny(unsafe_code)] to ensure everything is implemented in 100% Safe Rust.

Generational indexes

Index uses a generations scheme, so that if you hold an Index to a node, and it's removed, and a new node is allocated in its place, you do not access the new node.

Performance

In general, performance is quite good. Benchmarks against the standard library's LinkedList<T> are provided. But some other details:

  • The list keeps track of its head and tail for efficient insertion.
  • The underlying vector only grows, never shrinks. When a node is removed, its entry is marked as free for future insertions.
  • Free entries are themselves kept as a singly-linked list, meaning that they can be re-used efficiently.

Missing features

Right now, I've only implemented a minimal number of features; there's iter but no into_iter and iter_mut. This is on the to-do list. PRs welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].