SyntaxFix
Write A Post
Hire A Developer
Questions
The compiler isn't smart enough to know that <, >, and == are a "complete set". You can let it know that by removing the condition "if(val == sorted[mid])" -- it's redundant. Jut say "else return mid;"
<
>
==
else return mid;