Doubt in Target Sum Triplets

i have done already solved this question using vector.
but unable to use sort function in case of array(not vector)
please help me in it!