Skip to content

added impl for algorithm and base objects for algorithm#2574

Merged
siriak merged 12 commits into
TheAlgorithms:masterfrom
jhonDoe15:patch-1
Oct 27, 2021
Merged

added impl for algorithm and base objects for algorithm#2574
siriak merged 12 commits into
TheAlgorithms:masterfrom
jhonDoe15:patch-1

Conversation

@jhonDoe15

Copy link
Copy Markdown
Contributor

Describe your change:

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Java files are placed inside an existing directory.
  • All filenames are in all uppercase characters with no spaces or dashes.
  • All functions and variable names follow Java naming conventions.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@jhonDoe15 jhonDoe15 requested a review from siriak as a code owner October 11, 2021 18:11
@jhonDoe15

Copy link
Copy Markdown
Contributor Author

any changes and reviews are welcomed 😊

@jhonDoe15

Copy link
Copy Markdown
Contributor Author

I'd appreciate a code review

@siriak

siriak commented Oct 23, 2021

Copy link
Copy Markdown
Member

It's not a standard algorithm and I don't see where it can be used, so I don't think we should include it, thanks!

@siriak siriak closed this Oct 23, 2021
@jhonDoe15

jhonDoe15 commented Oct 23, 2021

Copy link
Copy Markdown
Contributor Author

@siriak it is used to find the tree node successor, its helpful in avl trees or when you need to find the node with the next greater key in the tree

@siriak

siriak commented Oct 24, 2021

Copy link
Copy Markdown
Member

Then could you implement it with 'keys' and not points? Anything with a strict order would do. And please reuse the existing classes for trees and other

@jhonDoe15

Copy link
Copy Markdown
Contributor Author

the node key is represented by the point and the x value for each point is used to find the node successor

@siriak

siriak commented Oct 24, 2021

Copy link
Copy Markdown
Member

Why do you need Point then? Just use Value instead of Point.X

@jhonDoe15

Copy link
Copy Markdown
Contributor Author

ok then, I'll replace it with a simple integer

@jhonDoe15

Copy link
Copy Markdown
Contributor Author

would you mind opening the PR so I can commit to it?

@siriak siriak reopened this Oct 24, 2021
transform usage from x, y point coordinates to plane integer values
@jhonDoe15

Copy link
Copy Markdown
Contributor Author

all fixed and updated with the master branch

@siriak siriak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall looks good, only some small changes needed


Sema Reaction: 👌 This code looks good

Comment thread DataStructures/Trees/nearestRightKey.java
Comment thread DataStructures/Trees/nearestRightKey.java Outdated
Comment thread DataStructures/Trees/nearestRightKey.java Outdated
@jhonDoe15 jhonDoe15 requested a review from yanglbme as a code owner October 25, 2021 06:42
NRKTree - NearestRightKeyTree - the regular tree lacks functionality required for this algorithm to function, specifically in the inserting method
@siriak siriak merged commit 0ab1114 into TheAlgorithms:master Oct 27, 2021
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.

add nearestRightKey algorithm

2 participants