-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Assignments for updated exercises and new exercises #776
Comments
update for pig-latin ✅ |
|
|
|
update for hamming ✅ |
|
I'll pass on the bowling exercise for now, as i'm a bit confused by the instructions, as usual. update for transpose ✅ |
update for matching-brackets ✅ |
I'm trying to update binary-search now. The current tests check for Any idea what would be idiomatic here? Throwing exception does not look like the correct approach here, and i'm not even able to find an appropriate exception type. What do you think about returning -1? This looks more reasonable to me. |
I checked Java's built-in Arrays.binarySearch and it's returning See https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#binarySearch-int:A-int- This looks reasonable, but it also feels like a bit overkill, as the insertion point might not be clearly communicated by the tests. It can be mentioned in an append file, though. |
I think throwing an exception is wrong, and not finding a value is not something exceptional.
That's fine, but I think that is mostly done in languages that don't allow for returning a nullable integer. What about just using |
To avoid duplicate work, assign yourself an exercise that you plan to work on by posting it here.
cc @ErikSchierboom
The text was updated successfully, but these errors were encountered: