Last active
August 23, 2019 18:13
-
-
Save nikasulo/16648aba1672287a70bb5e738822245f to your computer and use it in GitHub Desktop.
Ruby Node For a Deque
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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