Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Asutorufa
Copy link
Contributor

fix #10

Copy link
Member

@ammario ammario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. And, sorry for the wait.

Just a few minor comments and this is good to go. Bonus points for adding a test for the fix, but I will accept w/o it as no such test was present.

}
}
}

type SearchResult[T cmp.Ordered] struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a braking change. And, doesn't seem relevant to the core change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the result to include the distance, so I added a new function SearchWithDistance for that.

…after

2. add new search function return distance

Signed-off-by: Asutorufa <[email protected]>
@ammario ammario merged commit 41f4a36 into coder:main Jul 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nil pointer dereference after removing all nodes
2 participants