DEV Community

Discussion on: Binary Search Algorithm Explained

Collapse
 
eliseydev profile image
Elisey

There is a mistake in cpp example. It would not even compile. Array is set of 5 elements, but initializers are greater than 5. Also confusing mixing C and C++ style. For what reason include iostream and stdio.h?

Collapse
 
skinan profile image
Muhammad Sakib Khan Inan

Thanks for the correction. I have corrected the mistake.