grokking_algorithms icon indicating copy to clipboard operation
grokking_algorithms copied to clipboard

Minor fix in 01_binary_search.cpp

Open MahmoudHamdy00 opened this issue 1 year ago • 1 comments

use template to the item that we are search for

MahmoudHamdy00 avatar Sep 11 '23 11:09 MahmoudHamdy00

I like this change, but lower in the file we're comparing guess and item:

if (guess > item)

Is there a way to indicate in C++ that T can be any type that is comparable?

egonSchiele avatar Mar 22 '24 19:03 egonSchiele