Skip to content

Instantly share code, notes, and snippets.

@nikasulo
Last active August 23, 2019 18:13
Show Gist options
  • Save nikasulo/16648aba1672287a70bb5e738822245f to your computer and use it in GitHub Desktop.
Save nikasulo/16648aba1672287a70bb5e738822245f to your computer and use it in GitHub Desktop.
Ruby Node For a Deque
class Node
attr_accessor :value, :next_node, :prev_node
def initialize(value, next_node = nil, prev_node = nil)
@value = value
@next_node = next_node
@prev_node = prev_node
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment