Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
I feel a bit confused rigt now.
Did i misunderstand something with this random little excercise?
" Write a Java program to find the index of a value in a sorted array. If the value does not find return the index where it would be if it were inserted in order. Example:
[1, 2, 4, 5, 6] 5(target) -> 3(index)
[1, 2, 4, 5, 6] 0(target) -> 0(index)
[1, 2, 4, 5, 6] 7(target) -> 5(index) "
Here is what i did lol:
https://gist.github.com/laim2003/...
And here is the official solution:
https://gist.github.com/laim2003/...
Their solution seems a bit unnecessary complicated lol or am i wrong
question
challenge
java
gist
github