Sha256: d4f04617ecfb02ce4fc166e846a1d953bdaddfdafc0f0eaa72d2573f698ba790

Contents?: true

Size: 261 Bytes

Versions: 6

Compression:

Stored size: 261 Bytes

Contents

# frozen_string_literal: true

require_relative "../node"

class RedBlackTree
  class LeafNode < Node # @private
    def initialize
      super nil

      @colour = BLACK
    end

    def <=> other
      (other.instance_of? LeafNode) ? 0 : -1
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
red-black-tree-0.1.5 lib/red_black_tree/node/leaf_node.rb
red-black-tree-0.1.4 lib/red_black_tree/node/leaf_node.rb
red-black-tree-0.1.3 lib/red_black_tree/node/leaf_node.rb
red-black-tree-0.1.2 lib/red_black_tree/node/leaf_node.rb
red-black-tree-0.1.1 lib/red_black_tree/node/leaf_node.rb
red-black-tree-0.1.0 lib/red_black_tree/node/leaf_node.rb