Skip to main content
Module

x/structurae/sorted-array.ts>SortedArray.getDifferenceScore

Data structures for high-performance JavaScript applications.
Latest
method SortedArray.getDifferenceScore
import { SortedArray } from "https://deno.land/x/structurae@4.0.1/sorted-array.ts";

Returns the amount of differing elements in the first array.

Examples

SortedArray.getDifferenceScore([1, 2, 3, 4, 8], [2, 4, 6, 7, 9]); //=> 3

Parameters

a: U

the first array

b: U

the second array

optional
symmetric = [UNSUPPORTED]
optional
comparator = [UNSUPPORTED]

Returns

number

the amount of differing elements