Running through exercises on testdome...currently looking at https://www.testdome.com/for-developers/solve-question/9877
Implement function CountNum
CountNum
This passed all 4 tests:
public static int CountNumbers(int[] sortedArray, int lessThan) { int val = Array.BinarySearch(sortedArray, lessThan); return val < 0 ? ~val : val; }
As others have said, they expect you to use Array.BinarySearch which I didn't realise until read the 2nd hint.