my-solutions/leetcode/0002-add-two-numbers/types.rb

8 lines
162 B
Ruby

# Definition for singly-linked list.
class ListNode
attr_accessor :val, :next
def initialize(val = 0, _next = nil)
@val = val
@next = _next
end
end