-
-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak code example in binary-search approach
The switch statement in the loop-with-switch approach had two explicit cases and a default. The three cases that exist are: - equal - less than - greater than If we want to have two explicit cases and a default, then it would feel more symmetrical to have the less-than and greater-than cases be defined explicitly with the equal case being the default. However, it's hard to argue that any of the three are actually a default here. Instead I've changed it to have three explicit cases.
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters