Skip to content

Merge() func incorrect #2

@dimakuv

Description

@dimakuv

Hello!

There is a bag in your Merge() func, treap.go, line 197:

  • result.left = t.Merge(x, left)
  • result.left = t.Merge(left, x)

You forgot to switch arguments places. Your implementation tried to merge the "right.left with left" instead of "left with right.left".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions