Problem

Return number of pairs i<j with arr[i]==arr[j].

Examples

  • pairCount([1, 1, 1]) -> 3
Compile and test (Ctrl+Enter)