This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: uH3PC1W_1qU2N_QD_ETtkablQwg5I0gb3ZP0bN7y7is
Cover

Understanding LinkedList Data Structure in Ruby

Written by @yair | Published on 2020/4/21

TL;DR
In this article, we will create a singly LinkedList from scratch and explain how this data structure works and what it is useful for. The Big O time complexity to retrieve elements is 0(n) In a linked list, we can not retrieve an element by its index like in arrays. This is similar to an array because we can use both to store linear data. Linked lists need less space in memory than arrays and are dynamic and can expand its size. We will start by adding the add_first method to add a new element to our Linked list.

[story continues]


Written by
@yair
Technical Writer on HackerNoon.

Topics and
tags
programming|ruby|data-structures|linked-lists|arrays|tutorial|beginners|ruby-on-rails
This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: uH3PC1W_1qU2N_QD_ETtkablQwg5I0gb3ZP0bN7y7is