Skip to content
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

better function naming at API for "pop" & "popMax" #32

Open
spirinvladimir opened this issue Mar 12, 2020 · 0 comments
Open

better function naming at API for "pop" & "popMax" #32

spirinvladimir opened this issue Mar 12, 2020 · 0 comments

Comments

@spirinvladimir
Copy link
Contributor

spirinvladimir commented Mar 12, 2020

Dear Alexander,

During my last update from your branch I've found new function "popMax" for remove rightest node.
So now we have fully completed API for removing rightest and leftest nodes. All possible 2 direction at 2d AVL tree are covered.
I guess name "pop" function has some common with function from JavaScript Array prototype:

  1. same name
  2. return removed value/item
  3. remove item from data-structure's boundary

How to get better understanding what is "popMax" function. Looks like it has same functionality as "pop" but with "Max". What about exactly "Max"? Is it correct logic that "pop" function behavior means "popMin".

I personally fill a gap into semantic size around "pop" and "popMax" functions.

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

No branches or pull requests

1 participant