# create a struct with :value and :nextCell=Struct.new(:value,:next)# create a head of our listlist=Cell.new("head. hi",nil)# method which create one more cell and return the structdeflinked_list(value,cell)returnCell.new(value,cell)end3.times{|i|list=linked_list(i,list)}# O(1)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Your video is great, but where is code sample?
Here is a simple one, only add node.