ArrayUtils
Public Static Methods
and_scalar
static
Parameters
-
AFirst sorted array -
lenALength of array A -
BSecond sorted array -
lenBLength of array B -
outOutput array (allocated by function, caller must delete[])
Returns
Size of intersection (elements in out) Time complexity: O(lenA + lenB) Space complexity: O(min(lenA, lenB))or_scalar
static
Returns
Size of union (elements in out) Time complexity: O(lenA + lenB) Space complexity: O(lenA + lenB)exclude_scalar
static
Parameters
-
srcSource array -
lenSrcLength of source -
filterElements to exclude -
lenFilterLength of filter -
outOutput array (allocated by function)
Returns
Size of result Time complexity: O(lenSrc + lenFilter)skip_index_to_id
static
Parameters
-
curr_indexCurrent index (input/output) -
arraySorted array to search -
array_lenLength of array -
idValue to search for
Returns
true if id was found, false otherwisearrays_equal
static
is_sorted
static
intersect
static
union_of
static
exclude
static
contains
static
contains
static