You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recursive binary search "first occurrence" and "last occurrence" variations index out of bounds given an empty array, producing undefined (usually fine though) behavior. This should be fixed. Perhaps in these binary search variants, since we will always come out of the while loop before returning, we should perform size == 0 checks early on?
The text was updated successfully, but these errors were encountered:
The recursive binary search "first occurrence" and "last occurrence" variations index out of bounds given an empty array, producing undefined (usually fine though) behavior. This should be fixed. Perhaps in these binary search variants, since we will always come out of the
while
loop before returning, we should performsize == 0
checks early on?The text was updated successfully, but these errors were encountered: