Click or drag to resize
BinarySearchIndexOf Method
Returns the index of the specified key in the specified array.

Namespace: Algs4Net
Assembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public static int IndexOf(
	int[] a,
	int key
)

Parameters

a
Type: SystemInt32
a the array of integers, must be sorted in ascending order
key
Type: SystemInt32
key the search key

Return Value

Type: Int32
index of key in array a if present; -1 otherwise
See Also