Skip to content

added impl for algorithm and base objects for algorithm #2574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 27, 2021

Conversation

jhonDoe15
Copy link
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
Contributor Author

any changes and reviews are welcomed 😊

@jhonDoe15
Copy link
Contributor Author

I'd appreciate a code review

@siriak
Copy link
Member

siriak commented Oct 23, 2021

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
Copy link
Contributor Author

jhonDoe15 commented Oct 23, 2021

@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
Copy link
Member

siriak commented Oct 24, 2021

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
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
Copy link
Member

siriak commented Oct 24, 2021

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

@jhonDoe15
Copy link
Contributor Author

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

@jhonDoe15
Copy link
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
Contributor Author

all fixed and updated with the master branch

Copy link
Member

@siriak siriak left a comment

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

@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