Performance analysis of 3 digits sum
The running time is O(n3).  You have three nested loops:


Approximately n iterations of i
For each i, approximately n iterations of j
For each (i, j) pair, up to about n iterations of k.  On average, it take just 0.5 * n iterations of k, but the constant factor doesn't matter.


Quicksort is generally O(n log n).  So the total is O(n log n + 0.5 n × n × n), which is O(n3).

Since you took the trouble to sort the array, the innermost loop could be replaced by a binary search, which is O(log n).  Therefore, an improved algorithm could work in O(n2 log n).