HackerRank: Climbing the Leaderboard
Performance

It's the dedupe implementation that drags the performance of your solution down.
It's because Array.prototype.includes() does a linear search,
so your implementation becomes \$O(n^2)\$.
If you rewrite this function to be \$O(n)\$,
the solution will pass all tests.

Using arrays

The dedupe function takes as parameters an array and its size.
The size parameter is unnecessary and potentially confusing,
because you can always access that with .length.

Binary search

A common practice when implementing binary search over a list is to return the index of a value if it is found,
otherwise return a negative value from which the insertion point can be computed using the formula -1 -ret.
It would be cleaner to implement binarySearch(arr, value, low, high) in 
a way to follow this common contract,
and another rank function that would use the result of binarySearch to compute the correct rank.

Also, the implementation is a bit complicated.
Simpler techniques exist, and the cache is not needed either.
Consider this, for example:

function binarySearch(arr, value, lowIndex, highIndex) {
    if (lowIndex &gt; highIndex) {
        return -(lowIndex + 1);
    }

    let midIndex = lowIndex + Math.trunc((highIndex - lowIndex) / 2);
    if (value == arr[midIndex]) {
        return midIndex;
    }
    if (value &gt; arr[midIndex]) {
        return binarySearch(arr, value, lowIndex, midIndex - 1);
    }
    return binarySearch(arr, value, midIndex + 1, highIndex);
}