-
Notifications
You must be signed in to change notification settings - Fork 0
SortArray_Contains
Sancky edited this page Oct 18, 2022
·
1 revision
Check if an value exists in a sorted array.
SortArray_Contains(array[], value)
new SortedArray:array<10>;
SortArray_Insert(array, 1);
SortArray_Insert(array, 5);
SortArray_Insert(array, 10);
SortArray_Insert(array, 15);
printf("Sorted array have the element 20: %d", SortArray_Contains(array, 20));
Returns true if value exists, otherwise false.