class Linkedlist::Doubly(T)

Defined in:

linkedlist/doubly.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Intializes a doubly linked list


[View source]

Instance Method Detail

def head #

Returns the head of linked list

Running time: O(1)


[View source]
def insert_head(data : T) #

Inserts new element at the head of the linked list

Running time: O(1)


[View source]
def insert_tail(data : T) #

Inserts new element at the tail of the linked list

Running time: O(1)


[View source]
def length #

Returns the length of linked list

Running time: O(1)


[View source]
def tail #

Returns the tail of linked list

Running time: O(1)


[View source]