Skip to content

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

2 participants