Mistake in re-assigning the value of high
Incorrect output can be replicated by searching for 5 in this array { 2, 2, 2, 2, 3, 4, 5, 7, 7, 8, 10, 13, 13, 14, 14, 15, 15, 15, 16, 19 }
The correct re-assigning is with "-1"
high = mid - 1;
Regards,
iAlhasan ^_^
Binary_Search/Binary_Search/Program.cs
Line 102 in 2834aa9
Mistake in re-assigning the value of high
Incorrect output can be replicated by searching for 5 in this array { 2, 2, 2, 2, 3, 4, 5, 7, 7, 8, 10, 13, 13, 14, 14, 15, 15, 15, 16, 19 }
The correct re-assigning is with "-1"
high = mid - 1;Regards,
iAlhasan ^_^