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

make HashTableSeparateChaining get and remove methods a little DRYer … #8

Merged
merged 1 commit into from
Jan 22, 2016

Conversation

wruth
Copy link
Contributor

@wruth wruth commented Jan 19, 2016

…using do ... while instead of while loop

Hi Loiane! Thank you for taking a look at and merging my previous PR. Here's another one for you to consider. If you use a do ... while loop instead of just a while loop in the get() and remove() methods you can make the code a little DRYer/succinct. do ... while loops are somewhat obscure/less common, but I think can work well here. They will execute at least once, and evaluate their conditional at the bottom of the loop instead of at the top like most other loops.

loiane added a commit that referenced this pull request Jan 22, 2016
make HashTableSeparateChaining get and remove methods a little DRYer …
@loiane loiane merged commit 78e2e32 into loiane:second-edition Jan 22, 2016
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.

2 participants